mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 18:23:12 +00:00
Fix slots command with new yaml settings
This commit is contained in:
parent
aa0b2f803a
commit
1ae69ae2ce
2 changed files with 31 additions and 42 deletions
|
@ -15,23 +15,14 @@ est = pytz.timezone("US/Eastern")
|
|||
|
||||
|
||||
async def cmd(self, ctx, bet):
|
||||
# Currency handler
|
||||
ctx_currency = Currency(ctx.author.id)
|
||||
|
||||
# check if the user has enough cash
|
||||
player_balance = ctx_currency.balance
|
||||
if bet > player_balance:
|
||||
raise commands.BadArgument("you don't have enough cash.")
|
||||
elif bet <= 0:
|
||||
raise commands.BadArgument("the bet you entered is invalid.")
|
||||
|
||||
# # check if the bet exceeds the bet limit
|
||||
# bet_limit = int(resources["bet_limit"])
|
||||
# if abs(bet) > bet_limit:
|
||||
# message = strings["bet_limit"].format(ctx.author.name, Currency.format_human(bet_limit))
|
||||
# return await ctx.respond(content=message)
|
||||
|
||||
# calculate the results before the command is shown
|
||||
results = [random.randint(0, 6) for _ in range(3)]
|
||||
calculated_results = calculate_slots_results(bet, results)
|
||||
|
||||
|
@ -84,14 +75,14 @@ async def cmd(self, ctx, bet):
|
|||
|
||||
|
||||
def get_emotes(client):
|
||||
decoration = CONST.SLOTS["emotes"]
|
||||
return {name: client.get_emoji(emoji_id) for name, emoji_id in decoration.items()}
|
||||
emotes = CONST.EMOTE_IDS
|
||||
return {name: client.get_emoji(emoji_id) for name, emoji_id in emotes.items()}
|
||||
|
||||
|
||||
def calculate_slots_results(bet, results):
|
||||
result_type = None
|
||||
multiplier = None
|
||||
rewards = CONST.SLOTS["reward_multipliers"]
|
||||
rewards = CONST.SLOTS_MULTIPLIERS
|
||||
|
||||
# count occurrences of each item in the list
|
||||
counts = Counter(results)
|
||||
|
|
|
@ -58,36 +58,34 @@ art:
|
|||
emotes:
|
||||
guild_id: 1038051105642401812
|
||||
emote_ids:
|
||||
hit: 1119262723285467156
|
||||
stand: 1118923298298929154
|
||||
slots_animated_id: 1119262805309259800
|
||||
slots_0_id: 1119262803816095900
|
||||
slots_1_id: 1119262801261760600
|
||||
slots_2_id: 1119262800049615000
|
||||
slots_3_id: 1119262796497039500
|
||||
slots_4_id: 1119262794676715600
|
||||
slots_5_id: 1119262792386621600
|
||||
slots_6_id: 1119262791061229700
|
||||
S_Wide: 1119286730302955600
|
||||
L_Wide: 1119286763802857500
|
||||
O_Wide: 1119286787169329200
|
||||
T_Wide: 1119286804634406900
|
||||
CBorderBLeft: 1119286973572595700
|
||||
CBorderBRight: 1119286918459445400
|
||||
CBorderTLeft: 1119287006464331800
|
||||
CBorderTRight: 1119286865284051100
|
||||
HBorderB: 1119286936155213800
|
||||
HBorderT: 1119287027662344300
|
||||
VBorder: 1119286889854279700
|
||||
WSmall: 1119288536282173400
|
||||
ISmall: 1119288552673517600
|
||||
NSmall: 1119288579382857900
|
||||
LCentered: 1119287296127156400
|
||||
OCentered: 1119287563245584400
|
||||
SCentered: 1119287327588634600
|
||||
ECentered: 1119287343833166000
|
||||
Blank: 1119287267001905300
|
||||
lost: 1119288454212243600
|
||||
slots_animated_id: 1119262805309259776
|
||||
slots_0_id: 1119262803816095825
|
||||
slots_1_id: 1119262801261760592
|
||||
slots_2_id: 1119262800049614939
|
||||
slots_3_id: 1119262796497039510
|
||||
slots_4_id: 1119262794676715681
|
||||
slots_5_id: 1119262792386621555
|
||||
slots_6_id: 1119262791061229669
|
||||
S_Wide: 1119286730302955651
|
||||
L_Wide: 1119286763802857533
|
||||
O_Wide: 1119286787169329203
|
||||
T_Wide: 1119286804634406942
|
||||
CBorderBLeft: 1119286973572595712
|
||||
CBorderBRight: 1119286918459445408
|
||||
CBorderTLeft: 1119287006464331806
|
||||
CBorderTRight: 1119286865284051035
|
||||
HBorderB: 1119286936155213835
|
||||
HBorderT: 1119287027662344322
|
||||
VBorder: 1119286889854279680
|
||||
WSmall: 1119288536282173490
|
||||
ISmall: 1119288552673517608
|
||||
NSmall: 1119288579382857830
|
||||
LCentered: 1119287296127156325
|
||||
OCentered: 1119287563245584394
|
||||
SCentered: 1119287327588634647
|
||||
ECentered: 1119287343833165945
|
||||
Blank: 1119287267001905283
|
||||
lost: 1119288454212243607
|
||||
|
||||
introductions:
|
||||
intro_guild_id: 719227135151046700
|
||||
|
|
Loading…
Reference in a new issue