示例#1
0
        public async Task TextAvatar(SocketUser user = null, String text = "TEXT", String text1 = "", String text2 = "", String text3 = "", String text4 = "")
        {
            int nbArgument = 1;

            if (text4 != "")
            {
                nbArgument = 5;
            }
            if (text3 != "" && text4 == "")
            {
                nbArgument = 4;
            }
            if (text2 != "" && text3 == "")
            {
                nbArgument = 3;
            }
            if (text1 != "" && text2 == "")
            {
                nbArgument = 2;
            }



            EditImage editImage = new EditImage(CDN.GetUserAvatarUrl(user.Id, user.AvatarId, 512, ImageFormat.Auto));

            Console.WriteLine(user.GetAvatarUrl());
            editImage.writeMessageOnImage(text, text1, text2, text3, text4, nbArgument);

            await Context.Channel.SendFileAsync("image\\update.png");
        }
示例#2
0
        public async Task DistortionAvatar(SocketUser user = null, ushort size = 512)
        {
            EditImage editImage = new EditImage(CDN.GetUserAvatarUrl(user.Id, user.AvatarId, size, ImageFormat.Auto));

            Console.WriteLine(user.GetAvatarUrl());
            editImage.Brightness();


            await Context.Channel.SendFileAsync("image\\update.png", "Caption goes here");
        }