[Feature] Initial user apps support (#2883)
* omg it kinda works somehow * more things added * a bit of xmldocs * added interaction framework support * working? IF * more builder stuff * space * rename attribute to prevent conflict with `ContextType` enum * context type * moar features * remove integration types * trigger workflow * modelzzzz * `InteractionContextType` * allow setting custom status with `SetGameAsync` * bugzzz * app permissions * message interaction context * hm * push for cd * structs lets goooo * whoops forgot to change types * whoops x2 * tweak some things * xmldocs + missing prop + fix enabled in dm * moar validations * deprecate a bunch of stuffz * disable moar obsolete warnings * add IF sample * Apply suggestions from code review Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com> * Update src/Discord.Net.Rest/Entities/RestApplication.cs Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com> --------- Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
This commit is contained in:
@@ -164,6 +164,8 @@ Interaction service complex parameter constructors are prioritized in the follow
|
||||
3. Type's only public constuctor.
|
||||
|
||||
#### DM Permissions
|
||||
> [!WARNING]
|
||||
> [EnabledInDmAttribute] is being deprecated in favor of [CommandContextTypes] attribute.
|
||||
|
||||
You can use the [EnabledInDmAttribute] to configure whether a globally-scoped top level command should be enabled in Dms or not. Only works on top level commands.
|
||||
|
||||
@@ -419,6 +421,12 @@ Discord Slash Commands support name/description localization. Localization is av
|
||||
}
|
||||
```
|
||||
|
||||
## User Apps
|
||||
|
||||
User apps are the kind of Discord applications that are installed onto a user instead of a guild, thus making commands usable anywhere on Discord. Note that only users who have installed the application will see the commands. This sample shows you how to create a simple user install command.
|
||||
|
||||
[!code-csharp[Registering Commands Example](samples/intro/userapps.cs)]
|
||||
|
||||
[AutocompleteHandlers]: xref:Guides.IntFw.AutoCompletion
|
||||
[DependencyInjection]: xref:Guides.DI.Intro
|
||||
|
||||
@@ -447,6 +455,8 @@ Discord Slash Commands support name/description localization. Localization is av
|
||||
[ChannelTypesAttribute]: xref:Discord.Interactions.ChannelTypesAttribute
|
||||
[MaxValueAttribute]: xref:Discord.Interactions.MaxValueAttribute
|
||||
[MinValueAttribute]: xref:Discord.Interactions.MinValueAttribute
|
||||
[EnabledInDmAttribute]: xref:Discord.Interactions.EnabledInDmAttribute
|
||||
[CommandContextTypes]: xref:Discord.Interactions.CommandContextTypesAttribute
|
||||
|
||||
[IChannel]: xref:Discord.IChannel
|
||||
[IRole]: xref:Discord.IRole
|
||||
|
||||
Reference in New Issue
Block a user