Exemple #1
0
        public async Task Faceapp(string filterId, string url = null)
        {
            var imageUrl = await Context.GetImageUrl(url);

            var stream = await _faceApp.Filter(imageUrl, filterId);

            await Context.Channel.SendFileAsync(stream, "result.png");
        }
Exemple #2
0
        public async Task Faceapp(string filterId, string url = null)
        {
            var imageUrls = await Context.GetAllImageUrls(new[] { url });

            var imageUrl = imageUrls.FirstOrDefault() ?? throw new Exception("need an image");
            var stream   = await _faceApp.Filter(imageUrl, filterId);

            await Context.Channel.SendFileAsync(stream, "result.png");
        }