Exemple #1
0
        public async Task Comic()
        {
            System.Collections.Generic.IReadOnlyCollection <Attachment> attachments = Context.Message.Attachments;
            if (attachments.Count == 0)
            {
                await Send_img_plsAsync("You didnt attach a image").ConfigureAwait(false);

                return;
            }
            else if (attachments.Count > 1)
            {
                await Send_img_plsAsync("You attached more than one image").ConfigureAwait(false);

                return;
            }
            await Context.Channel.SendFileAsync(Filter(new WebClient().DownloadData(attachments.ElementAt(0).Url), MatrixFilters.Comic), "silverbotimage.png", "There ya go a image with the comic filter");
        }
Exemple #2
0
        public async Task Jpegize()
        {
            System.Collections.Generic.IReadOnlyCollection <Attachment> attachments = Context.Message.Attachments;
            if (attachments.Count == 0)
            {
                await Send_img_plsAsync("You didnt attach a image");

                return;
            }
            else if (attachments.Count > 1)
            {
                await Send_img_plsAsync("You attached more than one image");

                return;
            }
            using WebClient myWebClient  = new WebClient();
            using MemoryStream outStream = Make_jpegnised(myWebClient.DownloadData(attachments.ElementAt(0).Url));
            await Context.Channel.SendFileAsync(outStream, "silverbotimage.jpeg", "There ya go a jpegnized image");
        }