local image caching to redis done?

This commit is contained in:
Master Kwoth
2017-11-05 13:28:08 +01:00
parent 4b7b44f0d4
commit 607decfbcc
17 changed files with 267 additions and 121 deletions

View File

@ -9,6 +9,7 @@ using System.Linq;
using System.Threading.Tasks;
using NadekoBot.Common.Attributes;
using NadekoBot.Modules.Games.Services;
using System;
namespace NadekoBot.Modules.Games
{
@ -88,12 +89,18 @@ namespace NadekoBot.Modules.Games
else
msgToSend += " " + GetText("pick_sn", Prefix);
using (var toSend = imgData.Data.ToStream())
using (var toSend = imgData.ToStream())
{
msg = await Context.Channel.SendFileAsync(toSend, imgData.Name, msgToSend).ConfigureAwait(false);
msg = await Context.Channel.SendFileAsync(toSend, "plant.png", msgToSend, options: new RequestOptions()
{
RetryMode = RetryMode.AlwaysRetry
}).ConfigureAwait(false);
}
}
catch { }
catch (Exception ex)
{
_log.Warn(ex);
}
var msgs = new IUserMessage[amount];
msgs[0] = msg;