// This is not the recommended way to write a bot - consider // reading over the Commands Framework sample. private async Task MessageReceivedAsync(SocketMessage message) { if (message.Content.ToLower().StartsWith("!ping")) { await message.Channel.SendMessageAsync("pong!"); } var messageHelper = new MessageHelper(_client, message); // The bot should never respond to itself. if (message.Author.Id == _client.CurrentUser.Id) { return; } Console.WriteLine($"{message.Author.Username} Requested!"); if (await messageHelper.IsAuthorized()) { if (message.Content.EqualsAnyOf("!help", "!Help", "!HELP")) { await message.Channel.SendMessageAsync(embed : EmbedHelper.GetHelp()); } if (message.Content.ToLower().StartsWith("!stats")) { await messageHelper.GetStats(message); } if (message.Content.ToLower().StartsWith("!compare")) { await messageHelper.GetStatsCompare(message); } } }
public async Task Help() => await ReplyAsync(embed : EmbedHelper.GetHelp());