message deletion and krash (#102)

* Update message deletion in BlackjackCommand

Refactor message deletion logic for non-whisper messages.

* Add message deletion for non-whisper coinflip

* Implement message deletion for non-whispers

Added a check to delete non-whisper messages if they have a MessageUuid.

* Delete non-whisper messages in KenoCommand

* Implement KrashBetCommand for betting functionality

* Lambchop message deletion

Lambchop message deletion

* limbo message deletion

limbo message deletion

* Delete message if not a whisper mines

Delete message if not a whisper mines

* planes message dleete

planes message dleete

* plinko message delete

plinko message delete

* Add message deletion for non-whisper messages roulette

Delete the message if it's not a whisper and has a UUID.

* add message deletion for non-whisper slots

add message deletion for non-whisper slots

* Implement message deletion for WheelCommand

Add message deletion for non-whisper messages.

* Add KasinoKrash service initialization

* Add KasinoKrash service for game management

Implement KasinoKrash service for managing the Krash game, including state management, betting, and payout logic.

* Update message formatting in KasinoMines.cs

add buttons

* Update MinesCommand.cs

allow more mines spam since message will be deleted anyways, spam will be supported via button
This commit is contained in:
alogindtractor
2026-04-06 18:30:49 -07:00
committed by GitHub
parent d97d4f7fad
commit 26e0b1f49f
16 changed files with 409 additions and 21 deletions

View File

@@ -39,7 +39,7 @@ public class MinesCommand : ICommand
public RateLimitOptionsModel? RateLimitOptions => new RateLimitOptionsModel
{
MaxInvocations = 3,
MaxInvocations = 10,
Window = TimeSpan.FromSeconds(10)
};
public bool WhisperCanInvoke => false;
@@ -56,6 +56,10 @@ public class MinesCommand : ICommand
BuiltIn.Keys.KasinoMinesEnabled, BuiltIn.Keys.KasinoGameDisabledMessageCleanupDelay
]);
var cleanupDelay = TimeSpan.FromMilliseconds(settings[BuiltIn.Keys.KasinoMinesCleanupDelay].ToType<int>());
if (message is { IsWhisper: false, MessageUuid: not null })
{
await botInstance.KfClient.DeleteMessageAsync(message.MessageUuid);
}
if (!settings[BuiltIn.Keys.KasinoMinesEnabled].ToBoolean())
{
var gameDisabledCleanupDelay= TimeSpan.FromMilliseconds(settings[BuiltIn.Keys.KasinoGameDisabledMessageCleanupDelay].ToType<int>());