Revert "Fixes to currency stuff"

This reverts commit 77373a4a4a.
This commit is contained in:
Kwoth 2016-09-09 00:22:14 +02:00
parent 77373a4a4a
commit ea5191476a
5 changed files with 23 additions and 22 deletions

View File

@ -7,6 +7,7 @@ using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Administration.Commands namespace NadekoBot.Modules.Administration.Commands
{ {
@ -52,7 +53,7 @@ namespace NadekoBot.Modules.Administration.Commands
catch { } catch { }
}; };
}; };
#if !NADEKO_RELEASE
// start the userpresence queue // start the userpresence queue
NadekoBot.OnReady += () => NadekoBot.OnReady += () =>
@ -85,7 +86,6 @@ namespace NadekoBot.Modules.Administration.Commands
} }
}); });
}; };
#endif
} }
private async void ChannelUpdated(object sender, ChannelUpdatedEventArgs e) private async void ChannelUpdated(object sender, ChannelUpdatedEventArgs e)

View File

@ -1,7 +1,9 @@
using Discord.Commands; using Discord.Commands;
using NadekoBot.Classes; using NadekoBot.Classes;
using NadekoBot.Modules.Games.Commands.Trivia; using NadekoBot.Modules.Games.Commands.Trivia;
using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Linq;
namespace NadekoBot.Modules.Games.Commands namespace NadekoBot.Modules.Games.Commands
{ {
@ -22,26 +24,25 @@ namespace NadekoBot.Modules.Games.Commands
.Parameter("args", ParameterType.Multiple) .Parameter("args", ParameterType.Multiple)
.Do(async e => .Do(async e =>
{ {
//TriviaGame trivia; TriviaGame trivia;
//if (!RunningTrivias.TryGetValue(e.Server.Id, out trivia)) if (!RunningTrivias.TryGetValue(e.Server.Id, out trivia))
//{ {
// var showHints = !e.Args.Contains("nohint"); var showHints = !e.Args.Contains("nohint");
// var number = e.Args.Select(s => var number = e.Args.Select(s =>
// { {
// int num; int num;
// return new Tuple<bool, int>(int.TryParse(s, out num), num); return new Tuple<bool, int>(int.TryParse(s, out num), num);
// }).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault(); }).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault();
// if (number < 0) if (number < 0)
// return; return;
// var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number); var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number);
// if (RunningTrivias.TryAdd(e.Server.Id, triviaGame)) if (RunningTrivias.TryAdd(e.Server.Id, triviaGame))
// await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false); await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false);
// else else
// await triviaGame.StopGame().ConfigureAwait(false); await triviaGame.StopGame().ConfigureAwait(false);
//} }
//else 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 already running on this server.\n" + trivia.CurrentQuestion).ConfigureAwait(false);
await e.Channel.SendMessage("`Trivia game is temporarily disabled.`").ConfigureAwait(false);
}); });
cgb.CreateCommand(Module.Prefix + "tl") cgb.CreateCommand(Module.Prefix + "tl")

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB