35 Commits

Author SHA1 Message Date
barelyprofessional
e725ca5864 Moved to Lazy<T> and a static class for handling Redis connections with some methods to make it easier to work with JSON. Completely untested. 2026-04-26 20:30:56 -05:00
alogindtractor
9acc1172cc fixed rigging, add a little more delay to the rig message so you can see it better (#110)
fixed rigging, add a little more delay to the rig message so you can see it better
2026-04-23 05:10:14 +02:00
alogindtractor
26e0b1f49f 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
2026-04-07 03:30:49 +02:00
alogindtractor
377603ca35 kasino shop updated all chat message id to uuid (#95)
* Update KasinoMines.cs

* Update SlotsCommand.cs

* Update MinesCommand.cs

* Update PlinkoCommand.cs

* Update PlinkoCommand.cs

* Update PlinkoCommand.cs

* Update PlanesCommand.cs

* Update LimboCommand.cs

* Update KenoCommand.cs

* Update KasinoUserCommands.cs

* Update KasinoRain.cs

* Create KasinoShop.cs

* Create ShopCommands.cs

* Update BotServices.cs

* Update MoneyDbModels.cs
2026-03-14 23:09:48 +01:00
barelyprofessional
82a69f48dd Null warnings 2026-02-28 15:35:59 -06:00
barelyprofessional
c8016b4fc6 Update for new chyat 2026-02-28 15:34:36 -06:00
alogindtractor
1ce3f0e8e5 Update KasinoMines.cs (#84) 2026-02-13 06:57:25 +01:00
alogindtractor
b43ce3f95c Update KasinoMines.cs (#83)
maybe fix explode animation
2026-02-13 06:51:54 +01:00
alogindtractor
259d5c339b fix payouts (#82)
games were slightly overpaying by including the original wager in the payout
2026-02-12 04:59:06 +01:00
alogindtractor
c4995f55f2 Update KasinoMines.cs (#80)
fix payouts
2026-02-11 05:16:26 +01:00
alogindtractor
d71dd304fd update mines (#77)
* Update MinesCommand.cs

better cashout handling?
also limit mines to 8

* Update KasinoMines.cs

update cashout to have a delay before removing board message and add auto delete

* update cashout calculation

update cashout calculation
fair payout but house edge based chance for rigging
2026-02-10 15:40:43 +01:00
alogindtractor
21c8803eb9 fix board size, some fixes to auto cashout from cursor (#75)
* cursor fixes

cursor fixes

* Improve cashout condition validation

Refactor cashout condition to check for success and non-empty value.

* cursor

cursor

* Update BotServices.cs

* Update board size limit from 10 to 9

Update board size limit from 10 to 9
81 characters instead of 100
12 bytes per character per powershell, 
down from 1200 bytes to 972

* Implement message deletion for active games

Added logic to delete messages associated with active games.
2026-02-09 16:00:45 +01:00
alogindtractor
b6df015277 cursor fixes (#74)
cursor fixes
2026-02-09 07:05:39 +01:00
alogindtractor
e1b5970e8b char[,] to char[][] (#73)
* Refactor KasinoMines into MinesCommand class

char[,] to char[][]

* Refactor KasinoMines class and update game logic

char[,] to char[][]
2026-02-09 06:45:40 +01:00
alogindtractor
9643126cf8 updates message stuff (#72)
* Implement admin-only clear command for saved games

Added 'clear' command for admin to reset saved games.

* Refactor LastMessage handling in KasinoMines

Refactor LastMessage handling in KasinoMines
2026-02-09 06:26:34 +01:00
barelyprofessional
a272e155bd Ignore null 2026-02-08 22:34:15 -06:00
alogindtractor
20a267c702 fix last message id to check for null first for message reset (#71)
* Add JsonSerializerOptions for serialization and deserialization

Add JsonSerializerOptions for serialization and deserialization
apparently it has problems with lists with groups like my list<(int r, int c)> so needs options

* Fix null check for LastMessage.ChatMessageId

Fix null check for LastMessage.ChatMessageId
2026-02-09 05:33:34 +01:00
alogindtractor
3385722455 Add JsonSerializerOptions for serialization and deserialization (#70)
Add JsonSerializerOptions for serialization and deserialization
apparently it has problems with lists with groups like my list<(int r, int c)> so needs options
2026-02-09 04:48:00 +01:00
barelyprofessional
cdd309fa24 Suppress nullable warnings, re-implement the missing wait for message, extend the delay a little to make sure shit doesn't go out of order and update the ResetMessage message null check given A Log changed the type for whatever reason 2026-02-08 19:11:35 -06:00
alogindtractor
d5f04b5228 some sloppa fixes (#69)
* update

update

* service

service

* Optimize message retrieval in MinesCommand

Refactor message handling in MinesCommand to use last message directly.

* Replace LastMessageId with LastMessage object
2026-02-09 02:06:15 +01:00
barelyprofessional
2fb8f0bb89 Removed the weird 3 millisecond delays and added a wait for message 2026-02-07 20:37:41 -06:00
alogindtractor
6a47d0d25e mines update (#67)
* mines update

mines update

* Refactor betting logic to use valid coordinates

Refactor betting logic to use valid coordinates

* Refactor bet coordinate selection logic

Refactor random bet coordinate selection to improve clarity and prevent duplicate entries.

* update tostring

update tostring

* Refactor Bet method and update gem handling

Refactor Bet method to include an additional parameter for tracking calls. Update logic for handling gem counts and cash-out conditions.
2026-02-07 23:10:19 +01:00
barelyprofessional
8246b75868 Use gambler ID in Redis key to avoid the possibility of concurrent games messing with the state 2026-02-07 11:27:03 -06:00
barelyprofessional
6c6ed8d09e Check if LastMessageId is its default value or not before attempting to delete 2026-02-07 00:11:41 -06:00
barelyprofessional
0c61206e08 Added missing awaits for mines wins 2026-02-07 00:03:06 -06:00
barelyprofessional
15f68ee99b Add log message for reset 2026-02-06 23:59:45 -06:00
alogindtractor
3ec623f6a4 fix display, unfuck riggery (#65)
fix display, unfuck riggery
2026-02-07 06:53:25 +01:00
barelyprofessional
7179cf72ce Suppress nullable warnings 2026-02-06 23:12:31 -06:00
barelyprofessional
a64d4456ab Discard return value for explode so it stops crying 2026-02-06 23:12:00 -06:00
barelyprofessional
4072709ec6 Added missing awaits to Mines 2026-02-06 23:09:38 -06:00
alogindtractor
d726b4f638 fix chat message ID handling and index out of bounds error (#63)
* fix chat message ID handling and index out of bounds error

fix chat message ID handling and index out of bounds error

* fix feature incorrectly showing for some reason

idk why this started happening hopefully this fixes it, actual features might still be broken though
2026-02-06 09:59:54 -06:00
barelyprofessional
bf9d3268cd Use exclusive random for the mines board 2026-02-05 23:39:35 -06:00
barelyprofessional
80d4f81610 Fixed compiler warnings 2026-02-05 20:42:40 -06:00
barelyprofessional
1996b2b638 Refactored naming for Kasino Mines and decoupled it from BotServices as it has no long lived tasks or whatever 2026-02-05 20:19:34 -06:00
alogindtractor
2bb56c2388 Mines (#60)
* Add MinesCommand

Add MinesCommand
parses user input and submits it to mines service

* Add KasinoMines service to bot services

Add KasinoMines service to bot services

* kasinomines service code

kasinomines service code
holds all the game information so that games can be ongoing, you can leave your game and come back to it later,

* Update MinesCommand.cs

* Update KasinoMines.cs

* Update MinesCommand.cs

* add house edge to limbo

add house edge to limbo

* add house edge to keno

add house edge to keno

* Update BotServices.cs

forgot to add kasino mines item

* Update BuiltIn.cs

add kasinomines cleanup delay setting

* Update KenoCommand.cs

add difficulty options to keno, classic low medium high default high

* Update PlanesCommand.cs

adds house edge to planes
if your buffs cause house edge to be greater than 1, you have a HOUSE_EDGE - 1.0 % chance to get a guaranteed win,
if house edge is less than 1, 1-HOUSE EDGE chance for a guaranteed loss

* Update PlanesCommand.cs

missed a counter update

* Update PlinkoCommand.cs

plinko house edge update
changes vacuum strength based on house edge
2026-02-02 04:48:17 +01:00