Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        public async Task Speak([Remainder] string message = "")
        {
            await PermissionWrapper.DeleteMessage(Context.Message);

            await ReplyAsync(message);
        }