예제 #1
0
        internal async Task ConnectAsync(DiscordBotConfig config)
        {
            _client.Log             += _logger.Log;
            _client.MessageReceived += _handler.OnMessageReceivedAsync;

            await _client.LoginAsync(TokenType.Bot, config.Token);

            await _client.StartAsync();

            await _commands.AddModulesAsync(Assembly.GetEntryAssembly());
        }
예제 #2
0
        internal async Task ConnectAsync(DiscordBotConfig config)
        {
            _client = new DiscordSocketClient(config.SocketConfig);

            _client.Log += Log;
        }
예제 #3
0
 public Connection(DiscordBotConfig config)
 {
     _client = new DiscordSocketClient(config.SocketConfig);
 }