Discord.Net icon indicating copy to clipboard operation
Discord.Net copied to clipboard

[Bug]: Nested attributes are not passed down to commands

Open matthewzring opened this issue 3 months ago • 0 comments

Check The Docs

  • [X] I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • [X] I verified the issue was caused by Discord.Net.

Check your intents

  • [X] I double checked that I have the required intents.

Description

Defining the EnabledInDm attribute at the highest level class still allows commands inside the module to be executed in DMs.

Version

3.13.1

Working Version

No response

Logs

N/A

Sample

[EnabledInDm(false)]
public class PingModule : InteractionModuleBase<SocketInteractionContext>
{
    [SlashCommand("ping", "check if the bot is online")]
    public async Task PingAsync()
    {
        await RespondAsync("Pong!");
    }
}

Packages

N/A

Environment

  • OS: Windows 11
  • Architecture: x64
  • SDK: .NET 8.0.200

matthewzring avatar Mar 13 '24 11:03 matthewzring