示例#1
0
 public async Task Computer(IGuildUser user)
 {
     try
     {
         System.Drawing.Image img = HTTPrequest.RequestImage(user.GetAvatarUrl());
         PhotoCommands.Picture("computer", img, new Size(235, 235), new Point(325, 20));
         await Context.Channel.SendFileAsync("./Images/final.png");
     }
     catch (Exception)
     {
         await Context.Channel.SendMessageAsync("Avatar not found");
     }
 }
示例#2
0
 public async Task Tobecontinued(IGuildUser user)
 {
     try
     {
         System.Drawing.Image img = HTTPrequest.RequestImage(user.GetAvatarUrl());
         PhotoCommands.Tobecontinued(img);
         await Context.Channel.SendFileAsync("./Images/final.png");
     }
     catch (Exception)
     {
         await Context.Channel.SendMessageAsync("Avatar not found.");
     }
 }
示例#3
0
 public async Task Pickle(IGuildUser user)
 {
     try
     {
         System.Drawing.Image img = HTTPrequest.RequestImage(user.GetAvatarUrl());
         PhotoCommands.Picture("pickle", img, new Size(250, 250), new Point(404, 142));
         await Context.Channel.SendFileAsync("./Images/final.png");
     }
     catch (Exception)
     {
         await Context.Channel.SendMessageAsync("Avatar not found.");
     }
 }
示例#4
0
 public async Task Toilet(IGuildUser user)
 {
     try
     {
         System.Drawing.Image img = HTTPrequest.RequestImage(user.GetAvatarUrl());
         PhotoCommands.Picture("toilet", img, new Size(50, 50), new Point(120, 65));
         await Context.Channel.SendFileAsync("./Images/final.png");
     }
     catch (Exception ex)
     {
         await Context.Channel.SendMessageAsync("Avatar not found." + ex.Message);
     }
 }
示例#5
0
 public async Task Washer(IGuildUser user)
 {
     try
     {
         System.Drawing.Image img = HTTPrequest.RequestImage(user.GetAvatarUrl());
         GifProcessing.CreateGif(PhotoCommands.Washer(img, 0), PhotoCommands.Washer(img, 45), PhotoCommands.Washer(img, 90), PhotoCommands.Washer(img, 135),
                                 PhotoCommands.Washer(img, 180), PhotoCommands.Washer(img, 225), PhotoCommands.Washer(img, 270), PhotoCommands.Washer(img, 315), PhotoCommands.Washer(img, 315));
         await Context.Channel.SendFileAsync("./Images/final.gif");
     }
     catch (Exception x)
     {
         await Context.Channel.SendMessageAsync("Avatar not found." + x.Message);
     }
 }
示例#6
0
 public async Task Drake(IGuildUser use1, IGuildUser use2)
 {
     try
     {
         System.Drawing.Image img1 = HTTPrequest.RequestImage(use1.GetAvatarUrl());
         System.Drawing.Image img2 = HTTPrequest.RequestImage(use2.GetAvatarUrl());
         PhotoCommands.Drake(img1, img2);
         await Context.Channel.SendFileAsync("Images/final.png");
     }
     catch (Exception)
     {
         await Context.Channel.SendMessageAsync("Avatar not found.");
     }
 }
示例#7
0
        public async Task Lovemeter(IGuildUser use1, IGuildUser use2)
        {
            var    plainTextBytes = Encoding.UTF8.GetBytes(use1.ToString());
            string converted      = Convert.ToBase64String(plainTextBytes);

            byte[] LogoDataBy = Encoding.ASCII.GetBytes(converted);
            int    seed       = 0;

            foreach (byte byt in LogoDataBy)
            {
                seed += byt;
            }

            var    plainTextBytes2 = Encoding.UTF8.GetBytes(use2.ToString());
            string converted2      = Convert.ToBase64String(plainTextBytes2);

            byte[] LogoDataBy2 = Encoding.ASCII.GetBytes(converted2);
            foreach (byte byt in LogoDataBy2)
            {
                seed += byt;
            }

            Random x           = new Random(seed);
            long   loveprocent = x.Next(1, 101);

            System.Drawing.Image img1;
            System.Drawing.Image img2;
            try
            {
                img1 = HTTPrequest.RequestImage(use1.GetAvatarUrl());
                img2 = HTTPrequest.RequestImage(use2.GetAvatarUrl());
            }

            catch (Exception)
            {
                await Context.Channel.SendMessageAsync("Avatar not found.");

                return;
            }

            PhotoCommands.Lovemeter(img1, img2);
            await Context.Channel.SendFileAsync("Images/final.png", "They are loving each other in " + loveprocent + "%!");
        }