Cleanup. Trivia can't be ran with less than 3 quesitons. (>t 3)
This commit is contained in:
parent
bc7bc724ec
commit
957dcd7482
@ -33,8 +33,11 @@ namespace NadekoBot.Modules.Games.Commands
|
|||||||
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 < 3)
|
||||||
|
{
|
||||||
|
await e.Channel.SendMessage("Number too small.");
|
||||||
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);
|
||||||
|
@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Permissions.Classes
|
|||||||
|
|
||||||
foreach (var com in NadekoBot.Client.GetService<CommandService>().AllCommands)
|
foreach (var com in NadekoBot.Client.GetService<CommandService>().AllCommands)
|
||||||
{
|
{
|
||||||
if (com.Text.ToUpperInvariant().Equals(normalizedCmdTxt) || com.Aliases.Select(c=>c.ToUpperInvariant()).Contains(normalizedCmdTxt))
|
if (com.Text.ToUpperInvariant().Equals(normalizedCmdTxt) || com.Aliases.Select(c => c.ToUpperInvariant()).Contains(normalizedCmdTxt))
|
||||||
return com.Text;
|
return com.Text;
|
||||||
}
|
}
|
||||||
throw new NullReferenceException("That command does not exist.");
|
throw new NullReferenceException("That command does not exist.");
|
||||||
|
@ -204,7 +204,7 @@ namespace NadekoBot
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if NADEKO_RELEASE
|
#if NADEKO_RELEASE
|
||||||
await Task.Delay(220000).ConfigureAwait(false);
|
await Task.Delay(300000).ConfigureAwait(false);
|
||||||
#else
|
#else
|
||||||
await Task.Delay(1000).ConfigureAwait(false);
|
await Task.Delay(1000).ConfigureAwait(false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -204,6 +204,11 @@
|
|||||||
<Compile Include="Modules\Searches\Commands\OsuCommands.cs" />
|
<Compile Include="Modules\Searches\Commands\OsuCommands.cs" />
|
||||||
<Compile Include="Modules\Searches\Commands\PokemonSearchCommands.cs" />
|
<Compile Include="Modules\Searches\Commands\PokemonSearchCommands.cs" />
|
||||||
<Compile Include="Modules\Utility\UtilityModule.cs" />
|
<Compile Include="Modules\Utility\UtilityModule.cs" />
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="SQLite.cs" />
|
<Compile Include="SQLite.cs" />
|
||||||
<Compile Include="_Models\DataModels\TestDataModel.cs" />
|
<Compile Include="_Models\DataModels\TestDataModel.cs" />
|
||||||
<Compile Include="_Models\DataModels\Incident.cs" />
|
<Compile Include="_Models\DataModels\Incident.cs" />
|
||||||
@ -294,11 +299,6 @@
|
|||||||
<Compile Include="Modules\Trello\TrelloModule.cs" />
|
<Compile Include="Modules\Trello\TrelloModule.cs" />
|
||||||
<Compile Include="NadekoBot.cs" />
|
<Compile Include="NadekoBot.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Classes\NadekoStats.cs" />
|
<Compile Include="Classes\NadekoStats.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -324,13 +324,10 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<None Include="resources\images\hidden.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="resources\images\rip.png" />
|
<None Include="resources\images\rip.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
10
NadekoBot/Properties/Resources.Designer.cs
generated
10
NadekoBot/Properties/Resources.Designer.cs
generated
@ -580,16 +580,6 @@ namespace NadekoBot.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
|
||||||
/// </summary>
|
|
||||||
public static System.Drawing.Bitmap hidden {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("hidden", resourceCulture);
|
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -136,9 +136,6 @@
|
|||||||
<data name="heads" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="heads" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\resources\images\coins\heads.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\resources\images\coins\heads.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="hidden" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\resources\images\hidden.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="jack_of_clubs" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="jack_of_clubs" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\resources\images\cards\jack_of_clubs.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\resources\images\cards\jack_of_clubs.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 340 B |
BIN
NadekoBot/resources/images/rip/rip.png
Normal file
BIN
NadekoBot/resources/images/rip/rip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
NadekoBot/resources/images/rip/rose_overlay.png
Normal file
BIN
NadekoBot/resources/images/rip/rose_overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user