fixed newavatar
This commit is contained in:
parent
707418fc46
commit
af891b53f5
@ -470,8 +470,7 @@ namespace NadekoBot.Modules {
|
||||
var image = System.Drawing.Image.FromStream(imageStream);
|
||||
// Save the image to disk.
|
||||
image.Save("data/avatar.png", System.Drawing.Imaging.ImageFormat.Png);
|
||||
imageStream.Position = 0;
|
||||
await client.CurrentUser.Edit(NadekoBot.Creds.Password, avatar: imageStream);
|
||||
await client.CurrentUser.Edit(NadekoBot.Creds.Password, avatar: image.ToStream());
|
||||
// Send confirm.
|
||||
await e.Channel.SendMessage("New avatar set.");
|
||||
});
|
||||
|
@ -8,6 +8,7 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using NadekoBot.Classes.Permissions;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace NadekoBot.Modules {
|
||||
@ -308,6 +309,7 @@ namespace NadekoBot.Modules {
|
||||
|
||||
cgb.CreateCommand("cleanup")
|
||||
.Description("Cleans up hanging voice connections. BOT OWNER ONLY")
|
||||
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||
.Do(e => {
|
||||
foreach (var kvp in MusicPlayers) {
|
||||
var songs = kvp.Value.Playlist;
|
||||
|
Loading…
Reference in New Issue
Block a user