public DiscordBotClient(DiscordProviderConfigurations config) { client.MessageReceived += async(msg) => { await OnMessageReceive.Invoke(new DiscordMessageObject(msg)); }; client.MessageUpdated += async(msgCached, newMsg, channel) => { await OnMessageEdit.Invoke(new DiscordMessageObject(newMsg), new DiscordChannelObject(channel)); }; }
public DiscordBotProvider(DiscordProviderConfigurations config) { this.config = config; client = new DiscordShardedClient( new DiscordSocketConfig { TotalShards = config.ShardCount }); client.MessageReceived += async message => { await OnMessageReceive.Invoke(new DiscordMessageObject(message)); }; }