mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Removed shitty error handler
This commit is contained in:
@@ -43,23 +43,14 @@ public class BlackjackCommand : ICommand
|
|||||||
var cleanupDelay = TimeSpan.FromMilliseconds(
|
var cleanupDelay = TimeSpan.FromMilliseconds(
|
||||||
(await SettingsProvider.GetValueAsync(BuiltIn.Keys.KasinoDiceCleanupDelay)).ToType<int>());
|
(await SettingsProvider.GetValueAsync(BuiltIn.Keys.KasinoDiceCleanupDelay)).ToType<int>());
|
||||||
|
|
||||||
try
|
// Check if this is a new game or continuing existing game
|
||||||
|
if (arguments.TryGetValue("amount", out var amountGroup))
|
||||||
{
|
{
|
||||||
// Check if this is a new game or continuing existing game
|
await StartNewGame(botInstance, user, amountGroup.Value, cleanupDelay, ctx);
|
||||||
if (arguments.TryGetValue("amount", out var amountGroup))
|
|
||||||
{
|
|
||||||
await StartNewGame(botInstance, user, amountGroup.Value, cleanupDelay, ctx);
|
|
||||||
}
|
|
||||||
else if (arguments.TryGetValue("action", out var actionGroup))
|
|
||||||
{
|
|
||||||
await ContinueGame(botInstance, user, actionGroup.Value.ToLower(), cleanupDelay, ctx);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
else if (arguments.TryGetValue("action", out var actionGroup))
|
||||||
{
|
{
|
||||||
await botInstance.SendChatMessageAsync(
|
await ContinueGame(botInstance, user, actionGroup.Value.ToLower(), cleanupDelay, ctx);
|
||||||
$"[DEBUG] Blackjack error for {user.FormatUsername()}: {ex.Message}", true);
|
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user