public override void Draw(IDraw draw) { draw.DrawImage(this.Image, 0, 0, this.Image.Width, this.Image.Height, this.Rectangle.Left, this.Rectangle.Top, this.Rectangle.Width, this.Rectangle.Height, 0, null); }
public async Task GetDotaInfoes([Summary("Steam URL of the user whose game to get")] string url) { ulong steamId = Task.Run(async() => { return(await _dota.GetSteamIdAsync(url)); }).Result; if (IsValidChannel(Context.Guild.Id, Context.Channel.Id)) { if (steamId > 0) { var res = await _dota.GetDotaAsync(steamId); res.PlayerId = steamId; using (MemoryStream imageStream = new MemoryStream()) { _draw.DrawImage(res, imageStream); imageStream.Position = 0; await Context.Channel.SendFileAsync(imageStream, "Test.jpeg"); } } else { _ = _logger.LogMessage("Нет подходящего steamId"); } } }