Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/misha-133/discord.net.extensions.interactions
- Owner: Misha-133
- License: mit
- Created: 2023-02-27T07:24:40.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T07:16:38.000Z (5 months ago)
- Last Synced: 2024-09-16T08:46:52.852Z (5 months ago)
- Topics: csharp, discord, discord-api, discord-net
- Language: C#
- Homepage:
- Size: 86.9 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
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