Пример #1
0
        private async Task ComplimentsAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (user == null)
            {
                BotConfig conf  = BotConfig.Load();
                var       gconf = conf.GetConfig(Context.Guild.Id);
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}compliment <@user>`", false);

                return;
            }

            Random rnd = new Random();

            if (Context.User.Id != user.Id)
            {
                List <FunObject> compliments = await FunDatabase.GetOfTypeAsync("compliment");

                int    d          = rnd.Next(0, compliments.Count);
                string compliment = compliments[d].Text.Replace("USER", StringUtil.ToUppercaseFirst(user.Mention));
                await Context.Channel.SendMessageAsync(compliment);
            }
            else
            {
                List <FunObject> roasts = await FunDatabase.GetOfTypeAsync("roast");

                int    d     = rnd.Next(0, roasts.Count);
                string roast = roasts[d].Text.Replace("USER", StringUtil.ToUppercaseFirst(user.Mention));
                await Context.Channel.SendMessageAsync(roast);
            }
        }
Пример #2
0
        private async Task HugAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (user == null)
            {
                BotConfig conf  = BotConfig.Load();
                var       gconf = conf.GetConfig(Context.Guild.Id);
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}hug <@user>`", false);

                return;
            }

            List <FunObject> hugs = await FunDatabase.GetOfTypeAsync("hug");

            Random rnd = new Random();
            int    g   = rnd.Next(0, hugs.Count);
            string GIF = hugs[g].Extra;

            EmbedBuilder embed = new EmbedBuilder()
            {
                Title    = $"{Context.User.Username} hugged {user.Username}",
                ImageUrl = GIF,
                Color    = Color.DarkPurple,
                Footer   = new EmbedFooterBuilder()
                {
                    Text = $"{EmojiUtil.GetRandomEmoji()}  Requested by {Context.User.ToString()}"
                }
            };
            await Context.Channel.SendMessageAsync(null, false, embed.Build());
        }
Пример #3
0
        private async Task RoastAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (user == null)
            {
                user = Context.User as IUser;
            }

            Random           rnd    = new Random();
            List <FunObject> roasts = await FunDatabase.GetOfTypeAsync("roast");

            int    d     = rnd.Next(0, roasts.Count);
            string roast = roasts[d].Text.Replace("USER", StringUtil.ToUppercaseFirst(user.Mention));

            EmbedBuilder embed = new EmbedBuilder()
            {
                Description = roast,
                Footer      = new EmbedFooterBuilder()
                {
                    Text = "❄️  React with a snowflake to mark as too offensive..."
                },
                Color = Color.DarkPurple
            };

            var msg = await Context.Channel.SendMessageAsync(null, false, embed.Build());

            //await msg.AddReactionAsync(new Discord.Emoji("❄️"));
        }
Пример #4
0
        private async Task KillAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (user == null)
            {
                BotConfig conf  = BotConfig.Load();
                var       gconf = conf.GetConfig(Context.Guild.Id);
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}kill <@user>`", false);

                return;
            }

            Random           rnd    = new Random();
            List <FunObject> deaths = await FunDatabase.GetOfTypeAsync("death");

            int    d     = rnd.Next(0, deaths.Count);
            string death = deaths[d].Text.Replace("USER1", StringUtil.ToUppercaseFirst(Context.User.Mention)).Replace("USER2", StringUtil.ToUppercaseFirst(user.Mention));

            EmbedBuilder embed = new EmbedBuilder()
            {
                Description = death,
                Footer      = new EmbedFooterBuilder()
                {
                    Text = "❄️  React with a snowflake to mark as too offensive..."
                },
                Color = Color.DarkPurple
            };

            await Context.Channel.SendMessageAsync(null, false, embed.Build());
        }
Пример #5
0
        private async Task PunishMeAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (!(Context.Channel as ITextChannel).IsNsfw)
            {
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "NSFW Error", $"This command can only be used inside channels marked as nsfw...", false);

                return;
            }

            if (user == null)
            {
                BotConfig conf  = BotConfig.Load();
                var       gconf = conf.GetConfig(Context.Guild.Id);
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}punishme <@user>`", false);

                return;
            }

            Random           rnd         = new Random();
            List <FunObject> punishments = await FunDatabase.GetOfTypeAsync("punish");

            int r = rnd.Next(0, punishments.Count);

            string punishment = punishments[r].Text.Replace("USER1", StringUtil.ToUppercaseFirst(user.Mention)).Replace("USER2", StringUtil.ToUppercaseFirst(Context.User.Mention));

            await Context.Channel.SendMessageAsync(punishment);
        }
Пример #6
0
        private async Task PickupAsync(IUser user = null)
        {
            await Context.Message.DeleteAsync();

            if (user == null)
            {
                BotConfig conf  = BotConfig.Load();
                var       gconf = conf.GetConfig(Context.Guild.Id);
                await MessageUtil.SendErrorAsync((Context.Channel as ITextChannel), "Incorrect Command Usage", $"Correct Usage: `{gconf.Prefix}pickup <@user>`", false);

                return;
            }

            Random           rnd     = new Random();
            List <FunObject> pickups = await FunDatabase.GetOfTypeAsync("pickup");

            int    p      = rnd.Next(0, pickups.Count);
            string pickup = pickups[p].Text.Replace("USER1", StringUtil.ToUppercaseFirst(Context.User.Mention)).Replace("USER2", StringUtil.ToUppercaseFirst(user.Mention));

            await Context.Channel.SendMessageAsync(pickup);
        }
Пример #7
0
        private async Task JokeAsync()
        {
            await Context.Message.DeleteAsync();

            Random           rnd   = new Random();
            List <FunObject> jokes = await FunDatabase.GetOfTypeAsync("joke");

            int    d    = rnd.Next(0, jokes.Count);
            string joke = jokes[d].Text;

            EmbedBuilder embed = new EmbedBuilder()
            {
                Description = joke,
                Footer      = new EmbedFooterBuilder()
                {
                    Text = "❄️  React with a snowflake to mark as too offensive..."
                },
                Color = Color.DarkPurple
            };

            var msg = await Context.Channel.SendMessageAsync(null, false, embed.Build());

            //await msg.AddReactionAsync(new Discord.Emoji("❄️"));
        }