src/Bot/Bot.cs
/// <summary>
/// Load resources and start bot. function will be held on.
/// In case of any problems, check again if you have correct
/// token file in your initial source code directory.
/// </summary>
Load resources and start bot. function will be held on.
In case of any problems, check again if you have correct
token file in your initial source code directory.
Load resources and start bot . function will be held on . In case of any problems check again if you have correct token file in your initial source code directory .
public async Task StartUp()
        {
            var client = new DiscordSocketClient();
            client.Log += Log;
            var token = await File.ReadAllTextAsync(TokenPath);
            await client.LoginAsync(TokenType.Bot, token);
            await client.StartAsync();
            var commandHandler = new CommandHandler(client);
            commandHandler.SetUp();
            var reactionHandler = new ReactionHandler(client);
            reactionHandler.SetUp();
            await Task.Delay(-1);
        }
public async Task StartUp ( ) { var client = new DiscordSocketClient ( ) ; client . Log += Log ; var token = await File . ReadAllTextAsync ( TokenPath ) ; await client . LoginAsync ( TokenType . Bot , token ) ; await client . StartAsync ( ) ; var commandHandler = new CommandHandler ( client ) ; commandHandler . SetUp ( ) ; var reactionHandler = new ReactionHandler ( client ) ; reactionHandler . SetUp ( ) ; await Task . Delay ( - 1 ) ; }
Load resources and start bot.
Load resources and start bot .