mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-06 22:16:29 +03:00
Initial commit
This commit is contained in:
commit
3fa19a4794
8 changed files with 124 additions and 0 deletions
28
Boyfriend/Boyfriend.cs
Normal file
28
Boyfriend/Boyfriend.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue