Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/misha-133/discord.net.extensions.interactions

Extensions for Discord.Net.Interaction
https://github.com/misha-133/discord.net.extensions.interactions

csharp discord discord-api discord-net

Last synced: 4 months ago
JSON representation

Extensions for Discord.Net.Interaction

Awesome Lists containing this project

README

        

# Discord.Net.Extensions.Interactions



NuGet


Discord

An extension that provides additional functionality to [Discord.Net](https://github.com/discord-net/Discord.Net).Interactions package.

## Installation
- [Nuget](https://www.nuget.org/packages/Discord.Net.Extensions.Interactions)

## Features
- [guild-only command modules](https://github.com/Misha-133/Discord.Net.Extensions.Interactions#guild-only-commands)

## Examples
### Guild-only commands
Commands modules that inherit from `InteractionModuleBase` can be marked with a `[GuildModule]` attribute to register them only to guilds with provided ids, while all other modules will be registered globally.
```cs
[GuildModule(123456, 69696969, 1337)]
public class ExampleModule : InteractionModuleBase
{

}
```

interactionService`RegisterCommandsAsync` extension method has to be used to register commands.
```cs
await interactionService.RegisterCommandsAsync();
```

## Support

Still have questions or want to request a feature? Contact me in [Discord.Net](https://discord.gg/dnet) discord server