parent
77373a4a4a
commit
ea5191476a
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Modules.Administration.Commands
|
||||
{
|
||||
@ -52,7 +53,7 @@ namespace NadekoBot.Modules.Administration.Commands
|
||||
catch { }
|
||||
};
|
||||
};
|
||||
#if !NADEKO_RELEASE
|
||||
|
||||
// start the userpresence queue
|
||||
|
||||
NadekoBot.OnReady += () =>
|
||||
@ -85,7 +86,6 @@ namespace NadekoBot.Modules.Administration.Commands
|
||||
}
|
||||
});
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
private async void ChannelUpdated(object sender, ChannelUpdatedEventArgs e)
|
||||
|
@ -1,7 +1,9 @@
|
||||
using Discord.Commands;
|
||||
using NadekoBot.Classes;
|
||||
using NadekoBot.Modules.Games.Commands.Trivia;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Linq;
|
||||
|
||||
namespace NadekoBot.Modules.Games.Commands
|
||||
{
|
||||
@ -22,26 +24,25 @@ namespace NadekoBot.Modules.Games.Commands
|
||||
.Parameter("args", ParameterType.Multiple)
|
||||
.Do(async e =>
|
||||
{
|
||||
//TriviaGame trivia;
|
||||
//if (!RunningTrivias.TryGetValue(e.Server.Id, out trivia))
|
||||
//{
|
||||
// var showHints = !e.Args.Contains("nohint");
|
||||
// var number = e.Args.Select(s =>
|
||||
// {
|
||||
// int num;
|
||||
// return new Tuple<bool, int>(int.TryParse(s, out num), num);
|
||||
// }).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault();
|
||||
// if (number < 0)
|
||||
// return;
|
||||
// var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number);
|
||||
// if (RunningTrivias.TryAdd(e.Server.Id, triviaGame))
|
||||
// await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false);
|
||||
// else
|
||||
// await triviaGame.StopGame().ConfigureAwait(false);
|
||||
//}
|
||||
//else
|
||||
// await e.Channel.SendMessage("Trivia game is already running on this server.\n" + trivia.CurrentQuestion).ConfigureAwait(false);
|
||||
await e.Channel.SendMessage("`Trivia game is temporarily disabled.`").ConfigureAwait(false);
|
||||
TriviaGame trivia;
|
||||
if (!RunningTrivias.TryGetValue(e.Server.Id, out trivia))
|
||||
{
|
||||
var showHints = !e.Args.Contains("nohint");
|
||||
var number = e.Args.Select(s =>
|
||||
{
|
||||
int num;
|
||||
return new Tuple<bool, int>(int.TryParse(s, out num), num);
|
||||
}).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault();
|
||||
if (number < 0)
|
||||
return;
|
||||
var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number);
|
||||
if (RunningTrivias.TryAdd(e.Server.Id, triviaGame))
|
||||
await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false);
|
||||
else
|
||||
await triviaGame.StopGame().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
await e.Channel.SendMessage("Trivia game is already running on this server.\n" + trivia.CurrentQuestion).ConfigureAwait(false);
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Module.Prefix + "tl")
|
||||
|
BIN
NadekoBot/bin/Debug/data/currency_images/img1.jpg
Normal file
BIN
NadekoBot/bin/Debug/data/currency_images/img1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
BIN
NadekoBot/bin/Debug/data/currency_images/img2.jpg
Normal file
BIN
NadekoBot/bin/Debug/data/currency_images/img2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 225 KiB |
BIN
NadekoBot/bin/Debug/data/currency_images/img3.jpg
Normal file
BIN
NadekoBot/bin/Debug/data/currency_images/img3.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Loading…
Reference in New Issue
Block a user