1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-04 04:56:30 +03:00

start working on /ban command

This commit is contained in:
nrdk 2023-06-08 17:29:45 +05:00 committed by Octol1ttle
parent 91516a899c
commit a83aa03cf0
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
3 changed files with 55 additions and 7 deletions

View file

@ -10,6 +10,7 @@ using Remora.Discord.API.Objects;
using Remora.Discord.Caching.Extensions;
using Remora.Discord.Caching.Services;
using Remora.Discord.Commands.Extensions;
using Remora.Discord.Commands.Services;
using Remora.Discord.Gateway;
using Remora.Discord.Gateway.Extensions;
using Remora.Discord.Hosting.Extensions;
@ -24,6 +25,17 @@ public class Boyfriend {
public static async Task Main(string[] args) {
var host = CreateHostBuilder(args).UseConsoleLifetime().Build();
var services = host.Services;
var configuration = services.GetRequiredService<IConfiguration>();
var slashService = services.GetRequiredService<SlashService>();
var updateSlash = await slashService.UpdateSlashCommandsAsync(new Snowflake(1115043975573811250));
if (!updateSlash.IsSuccess) {
Console.WriteLine("Failed to update slash commands: {Reason}", updateSlash.Error.Message);
}
await host.RunAsync();
}