mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
bind interaction to module
This commit is contained in:
parent
feb3cf328f
commit
54dd0b0f6e
4 changed files with 10 additions and 4 deletions
|
|
@ -54,6 +54,12 @@ internal class DiscordBot : IHostedService
|
|||
await interactionModule.AddModuleAsync(typeof(MareModule), _services).ConfigureAwait(false);
|
||||
await interactionModule.RegisterCommandsToGuildAsync(guild.Id, true).ConfigureAwait(false);
|
||||
|
||||
_discordClient.InteractionCreated += async (x) =>
|
||||
{
|
||||
var ctx = new SocketInteractionContext(_discordClient, x);
|
||||
await interactionModule.ExecuteCommandAsync(ctx, _services);
|
||||
};
|
||||
|
||||
_ = RemoveUsersNotInVanityRole();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue