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: 9 months ago
JSON representation
Extensions for Discord.Net.Interaction
- Host: GitHub
- URL: https://github.com/misha-133/discord.net.extensions.interactions
- Owner: Misha-133
- License: mit
- Created: 2023-02-27T07:24:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T07:20:54.000Z (over 1 year ago)
- Last Synced: 2025-04-14T09:12:41.980Z (about 1 year ago)
- Topics: csharp, discord, discord-api, discord-net
- Language: C#
- Homepage:
- Size: 91.8 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Discord.Net.Extensions.Interactions
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