fixed hide/unhide thanks to voltana
This commit is contained in:
parent
3f9c99d8c2
commit
b111ff0f12
@ -456,12 +456,9 @@ namespace NadekoBot.Modules
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (Stream ms = File.OpenRead("images/hidden.png"))
|
||||||
using (Image img = Image.FromFile("images/hidden.png"))
|
|
||||||
{
|
{
|
||||||
img.Save(ms, ImageFormat.Png);
|
await client.CurrentUser.Edit(NadekoBot.password, avatar: ms);
|
||||||
|
|
||||||
await client.CurrentUser.Edit(NadekoBot.password, null, null, null, ms, ImageType.Png);
|
|
||||||
}
|
}
|
||||||
await e.Send("*hides*");
|
await e.Send("*hides*");
|
||||||
}
|
}
|
||||||
@ -477,12 +474,8 @@ namespace NadekoBot.Modules
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
using (Stream ms = File.OpenRead("images/nadeko.jpg")) {
|
||||||
using (Image img = Image.FromFile("images/nadeko.jpg"))
|
await client.CurrentUser.Edit(NadekoBot.password, avatar: ms,avatarType:ImageType.Jpeg);
|
||||||
{
|
|
||||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
|
|
||||||
|
|
||||||
await client.CurrentUser.Edit(NadekoBot.password, null, null, null, ms, ImageType.Jpeg);
|
|
||||||
}
|
}
|
||||||
await e.Send("*unhides*");
|
await e.Send("*unhides*");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user