Exemplo n.º 1
0
        public async Task KickAsync()
        {
            string msg   = " ";
            string title = "";

            msg = msg.Replace("u!kick", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            if (names.Length > 0)
            {
                names[0] = names[0].Replace("!", "");
            }
            title = Context.User.Username + " kicks themself";
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562631588511744/kick5.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562673619369994/kick1.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562720549568512/kick2.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494577333576138763/kick3.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562816133431296/kick4.gif");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 2
0
        public async Task SlapAsync()
        {
            string msg   = " ";
            string title = "";

            msg = msg.Replace("u!slap", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            title = Context.User.Username + " slaps themself";
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494144313404555274/giphy.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147027064717322/3b3c291b732c757fc2a9d0f18d34402e37349b73_hq.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147468787843092/original.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147323169865728/tumblr_mflza5vE4o1r72ht7o2_400.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147192068767744/never_ending_bitch_slap_by_yindragon-d4kiubr.gif");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 3
0
        public async Task TeamAsync([Remainder] string msg)
        {
            string newmsg = "";

            Console.WriteLine(msg);
            msg = msg.Replace("team ", "");
            //int n = WordCounting.CountWords1(msg, "@") + 1;
            msg = msg.Replace("!", "");
            Console.WriteLine(msg);
            string[] msg1 = Pings.Split(msg);

            new Random().Shuffle(msg1);

            int j = msg1.Length;//3

            for (int i = 0; i < ((msg1.Length) / 2); i++)
            {
                j--;
                if (j == i)
                {
                    await ReplyAsync((msg1[i].ToString() + " is alone").ToString());

                    break;
                }
                else if (i - j == 1)
                {
                    newmsg += (msg1[i].ToString() + " is alone").ToString();
                    break;
                }
                newmsg += ("Team " + (i + 1).ToString() + ": " + msg1[i].ToString() + " and " + msg1[j].ToString() + "\n").ToString();
            }

            await ReplyAsync(newmsg);
        }
Exemplo n.º 4
0
        public async Task HugAsync([Remainder] string msg)
        {
            string user = Context.User.Username;
            ulong  iD   = Context.User.Id;
            IUser  iuser;
            string title = "";

            msg = msg.Replace("u!hug", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            if (names.Length > 0)
            {
                names[0] = names[0].Replace("!", "");
            }
            if (names.Length == 0 || names[0] == ("<@" + (iD).ToString() + ">").ToString())
            {
                title = user + " hugs themself";
            }
            else
            {
                names[0] = names[0].Remove(0, 2);
                names[0] = names[0].Replace(">", "");
                ulong.TryParse(names[0], out ulong result);
                iuser = await Context.Channel.GetUserAsync(result);

                title = user + " hugs " + iuser.Username + " ";
            }
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://media.tenor.com/images/d5c635dcb613a9732cfd997b6a048f80/tenor.gif");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/42922e87b3ec288b11f59ba7f3cc6393/tenor.gif?itemid=5634630");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/1069921ddcf38ff722125c8f65401c28/tenor.gif?itemid=11074788");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/460c80d4423b0ba75ed9592b05599592/tenor.gif?itemid=5044460");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/44b4b9d5e6b4d806b6bcde2fd28a75ff/tenor.gif?itemid=9383138");
            gif          = Pings.add(gif, "https://images-ext-2.discordapp.net/external/dwTWixM8K-ZizvgespNWYLLV3LtHY1J3pen3pq4IGGQ/https/i.giphy.com/rSNAVVANV5XhK.gif");
            gif          = Pings.add(gif, "https://media.tenor.com/images/a756a73934fb6252bb9acf174d019c73/tenor.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/613686019077832704/613687991399088138/Friends-1.gif");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 5
0
        public async Task PatAsync([Remainder] string msg)
        {
            string user = Context.User.Username;
            ulong  iD   = Context.User.Id;
            IUser  iuser;
            string title = "";

            msg = msg.Replace("u!pat", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            if (names.Length > 0)
            {
                names[0] = names[0].Replace("!", "");
            }
            if (names.Length == 0 || names[0] == ("<@" + (iD).ToString() + ">").ToString())
            {
                title = user + " pats themself";
            }
            else
            {
                names[0] = names[0].Remove(0, 2);
                names[0] = names[0].Replace(">", "");
                ulong.TryParse(names[0], out ulong result);
                iuser = await Context.Channel.GetUserAsync(result);

                title = user + " pats " + iuser.Username + " ";
            }
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://media1.tenor.com/images/f5176d4c5cbb776e85af5dcc5eea59be/tenor.gif?itemid=5081286");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/f330c520a8dfa461130a799faca13c7e/tenor.gif?itemid=13911345");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/54722063c802bac30d928db3bf3cc3b4/tenor.gif?itemid=8841561");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/282cc80907f0fe82d9ae1f55f1a87c03/tenor.gif?itemid=12018857");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/1e92c03121c0bd6688d17eef8d275ea7/tenor.gif?itemid=9920853");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/7938cdb8aa798486e2e2f1d997ea7797/tenor.gif?itemid=14816799");
            gif          = Pings.add(gif, "https://media1.tenor.com/images/5466adf348239fba04c838639525c28a/tenor.gif?itemid=13284057");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 6
0
        public async Task KickAsync([Remainder] string msg)
        {
            string user = Context.User.Username;
            ulong  iD   = Context.User.Id;
            IUser  iuser;
            string title = "";

            msg = msg.Replace("u!kick", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            if (names.Length > 0)
            {
                names[0] = names[0].Replace("!", "");
            }
            if (names.Length == 0 || names[0] == ("<@" + (iD).ToString() + ">").ToString())
            {
                title = user + " kicks themself";
            }
            else
            {
                names[0] = names[0].Remove(0, 2);
                names[0] = names[0].Replace(">", "");
                ulong.TryParse(names[0], out ulong result);
                iuser = await Context.Channel.GetUserAsync(result);

                title = user + " kicks " + iuser.Username + " ";
            }
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562631588511744/kick5.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562673619369994/kick1.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562720549568512/kick2.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494577333576138763/kick3.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494562816133431296/kick4.gif");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 7
0
        public async Task SlapAsync([Remainder] string msg)
        {
            IUser  iuser;
            string title = "";

            msg = msg.Replace("u!slap", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            Console.WriteLine("msg je " + msg);
            if (names.Length > 0)
            {
                names[0] = names[0].Replace("!", "");
            }
            if (names.Length == 0 || names[0] == ("<@" + (Context.User.Id).ToString() + ">").ToString())
            {
                title = Context.User.Username + " slaps themself";
            }
            else
            {
                Console.WriteLine("id pre prerade je " + names[0]);
                names[0] = names[0].Remove(0, 2);
                names[0] = names[0].Replace(">", "");
                ulong.TryParse(names[0], out ulong result);
                iuser = await Context.Channel.GetUserAsync(result);

                Console.WriteLine(result.ToString());
                title = Context.User.Username + " slaps " + iuser.Username + " ";
            }
            string[] gif = new string[0];
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494144313404555274/giphy.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147027064717322/3b3c291b732c757fc2a9d0f18d34402e37349b73_hq.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147468787843092/original.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147323169865728/tumblr_mflza5vE4o1r72ht7o2_400.gif");
            gif          = Pings.add(gif, "https://cdn.discordapp.com/attachments/316675507628539905/494147192068767744/never_ending_bitch_slap_by_yindragon-d4kiubr.gif");
            randomNumber = random.Next(0, gif.Length);
            Console.WriteLine(gif.Length.ToString());
            var builder = new EmbedBuilder().WithTitle(title).WithImageUrl(gif[randomNumber]);
            var embed   = builder.Build();

            await ReplyAsync("", embed : embed);
        }
Exemplo n.º 8
0
        public async Task RPSAsync([Remainder] string msg)
        {
            string newmsg = "";

            msg = msg.Replace("rps ", "");
            Random random       = new Random();
            int    randomNumber = random.Next(0, 3);

            string[] names = Pings.Split(msg);
            int[]    threw = new int[names.Length];


            for (int i = 0; i < names.Length; i++)
            {
                randomNumber = random.Next(0, 3);
                switch (randomNumber)
                {
                case 0:
                    threw[i] = randomNumber;
                    newmsg   = newmsg + names[i] + ": :v: \n";
                    break;

                case 1:
                    threw[i] = randomNumber;
                    newmsg   = newmsg + names[i] + ": :fist: \n";
                    break;

                case 2:
                    threw[i] = randomNumber;
                    newmsg   = newmsg + names[i] + ": :hand_splayed: \n";
                    break;
                }
                Console.WriteLine((i + "" + threw[i]).ToString());
            }

            int win    = 0;
            int winnie = 0;

            Console.WriteLine(("\nlenght je" + names.Length).ToString());
            for (int i = 0; i < names.Length; i++)
            {
                win = 0;
                for (int j = 0; j < names.Length; j++)
                {
                    if (i == j)
                    {
                        continue;
                    }
                    if (threw[i] == 1 && threw[j] == 0)
                    {
                        win++;
                        if (win == names.Length - 1)
                        {
                            winnie = i + 1;
                        }
                    }
                    else if (threw[i] == 2 && threw[j] == 1)
                    {
                        win++;
                        if (win == names.Length - 1)
                        {
                            winnie = i + 1;
                        }
                    }
                    else if (threw[i] == 0 && threw[j] == 2)
                    {
                        win++;
                        if (win == names.Length - 1)
                        {
                            winnie = i + 1;
                        }
                    }
                }
            }
            Console.WriteLine(("\ntrenutni winnie je " + winnie).ToString());
            if (winnie != 0)
            {
                newmsg = newmsg + names[winnie - 1] + " WINS";
            }
            else if (winnie == 0 && win != 0)
            {
                newmsg += "NO ONE WINS";
            }
            else
            {
                newmsg += "NO RESULT";
            }
            await ReplyAsync(newmsg);
        }