mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-07 22:46:30 +03:00
Add /mute command (timeouts only) (#44)
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
7a4e20852e
commit
0e3e562b22
13 changed files with 1477 additions and 745 deletions
|
@ -31,6 +31,10 @@ public class Boyfriend {
|
|||
var services = host.Services;
|
||||
|
||||
var slashService = services.GetRequiredService<SlashService>();
|
||||
// Providing a guild ID to this call will result in command duplicates!
|
||||
// To get rid of them, provide the ID of the guild containing duplicates,
|
||||
// comment out calls to WithCommandGroup in CreateHostBuilder
|
||||
// then launch the bot again and remove the guild ID
|
||||
await slashService.UpdateSlashCommandsAsync();
|
||||
|
||||
await host.RunAsync();
|
||||
|
@ -69,6 +73,7 @@ public class Boyfriend {
|
|||
services.AddTransient<IConfigurationBuilder, ConfigurationBuilder>()
|
||||
.AddDiscordCaching()
|
||||
.AddDiscordCommands(true)
|
||||
.AddPreparationErrorEvent<ErrorLoggingPreparationErrorEvent>()
|
||||
.AddPostExecutionEvent<ErrorLoggingPostExecutionEvent>()
|
||||
.AddInteractivity()
|
||||
.AddInteractionGroup<InteractionResponders>()
|
||||
|
@ -77,7 +82,8 @@ public class Boyfriend {
|
|||
.AddHostedService<GuildUpdateService>()
|
||||
.AddCommandTree()
|
||||
.WithCommandGroup<BanCommandGroup>()
|
||||
.WithCommandGroup<KickCommandGroup>();
|
||||
.WithCommandGroup<KickCommandGroup>()
|
||||
.WithCommandGroup<MuteCommandGroup>();
|
||||
var responderTypes = typeof(Boyfriend).Assembly
|
||||
.GetExportedTypes()
|
||||
.Where(t => t.IsResponder());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue