Removed hide/unhide commands. Removed "Trivia cancelled" console message. Slight change to .newavatar
This commit is contained in:
parent
052fa32e55
commit
c540b2c3d6
@ -720,11 +720,13 @@ namespace NadekoBot.Modules.Administration
|
||||
var avatarAddress = e.GetArg("img");
|
||||
var imageStream = await SearchHelper.GetResponseStreamAsync(avatarAddress).ConfigureAwait(false);
|
||||
var image = System.Drawing.Image.FromStream(imageStream);
|
||||
// Save the image to disk.
|
||||
image.Save("data/avatar.png", System.Drawing.Imaging.ImageFormat.Png);
|
||||
await client.CurrentUser.Edit(NadekoBot.Creds.Password, avatar: image.ToStream()).ConfigureAwait(false);
|
||||
|
||||
// Send confirm.
|
||||
await e.Channel.SendMessage("New avatar set.").ConfigureAwait(false);
|
||||
|
||||
// Save the image to disk.
|
||||
image.Save("data/avatar.png", System.Drawing.Imaging.ImageFormat.Png);
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "setgame")
|
||||
|
@ -258,28 +258,6 @@ namespace NadekoBot.Modules.Conversations
|
||||
await e.Channel.SendMessage("I can't find a message mentioning you.").ConfigureAwait(false);
|
||||
});
|
||||
|
||||
cgb.CreateCommand("hide")
|
||||
.Description("Hides Nadeko in plain sight!11!!")
|
||||
.Do(async e =>
|
||||
{
|
||||
using (var ms = Resources.hidden.ToStream(ImageFormat.Png))
|
||||
{
|
||||
await client.CurrentUser.Edit(NadekoBot.Creds.Password, avatar: ms).ConfigureAwait(false);
|
||||
}
|
||||
await e.Channel.SendMessage("*hides*").ConfigureAwait(false);
|
||||
});
|
||||
|
||||
cgb.CreateCommand("unhide")
|
||||
.Description("Unhides Nadeko in plain sight!1!!1")
|
||||
.Do(async e =>
|
||||
{
|
||||
using (var fs = new FileStream("data/avatar.png", FileMode.Open))
|
||||
{
|
||||
await client.CurrentUser.Edit(NadekoBot.Creds.Password, avatar: fs).ConfigureAwait(false);
|
||||
}
|
||||
await e.Channel.SendMessage("*unhides*").ConfigureAwait(false);
|
||||
});
|
||||
|
||||
cgb.CreateCommand("dump")
|
||||
.Description("Dumps all of the invites it can to dump.txt.** Owner Only.**")
|
||||
.Do(async e =>
|
||||
|
@ -2,7 +2,6 @@
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Classes;
|
||||
using NadekoBot.Extensions;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -79,10 +78,7 @@ namespace NadekoBot.Modules.Games.Commands.Trivia
|
||||
await Task.Delay(QuestionDurationMiliseconds - HintTimeoutMiliseconds, token).ConfigureAwait(false);
|
||||
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
Console.WriteLine("Trivia cancelled");
|
||||
}
|
||||
catch (TaskCanceledException) { } //means someone guessed the answer
|
||||
GameActive = false;
|
||||
if (!triviaCancelSource.IsCancellationRequested)
|
||||
await channel.Send($":clock2: :question: **Time's up!** The correct answer was **{CurrentQuestion.Answer}**").ConfigureAwait(false);
|
||||
|
Loading…
Reference in New Issue
Block a user