1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 09:09:00 +03:00
Octobot/Boyfriend/Boyfriend.cs

28 lines
774 B
C#
Raw Normal View History

2021-12-07 15:52:37 +03:00
using Discord;
using Discord.WebSocket;
namespace Boyfriend;
public class Boyfriend {
public static void Main(string[] args)
=> new Boyfriend().MainAsync().GetAwaiter().GetResult();
public static readonly DiscordSocketClient Client = new();
private async Task MainAsync() {
Client.Log += Log;
var token = File.ReadAllText("token.txt").Trim();
await Client.LoginAsync(TokenType.Bot, token);
await Client.StartAsync();
await new CommandHandler().InstallCommandsAsync();
await Task.Delay(-1);
}
private static Task Log(LogMessage msg) {
Console.WriteLine(msg.ToString());
return Task.CompletedTask;
}
}