public async Task AddSwear(string word) { DiscordServer server = DiscordServer.GetServerFromID(Context.Guild.Id); if (server != null) { if (server.swearJar == null) { server.swearJar = new List <string>(); } if (server.swearJar.Find(x => x == word) == null) { server.swearJar.Add(word); await PermissionWrapper.DeleteMessage(Context.Message); server.SaveData(); IUserMessage addedMessage = await ReplyAsync("The word has been added in the swearjar"); await Task.Delay(2500); } else { await PermissionWrapper.DeleteMessage(Context.Message); IUserMessage addedMessage = await ReplyAsync("The word is already in the swearjar"); await Task.Delay(2500); } } }
public async Task React([Remainder] string message = "") { await PermissionWrapper.DeleteMessage(Context.Message); if (string.IsNullOrEmpty(message)) { await ListReactions(); return; } if (File.Exists("Images/Reactions/" + message + ".png")) { await Context.Channel.SendFileAsync("Images/Reactions/" + message + ".png"); } else { await ReplyAsync("No such as reaction: " + message); } }
public async Task Speak([Remainder] string message = "") { await PermissionWrapper.DeleteMessage(Context.Message); await ReplyAsync(message); }