1
0
Fork 0
forked from waifu/kemoverse

weigh response

This commit is contained in:
w 2025-06-03 22:54:25 -03:00
parent c2fd435622
commit 0c2e3754da

View file

@ -84,10 +84,10 @@ dumbass.',
'attachment_urls': None
}
if len(arguments) != 3:
if len(arguments) != 2:
return {
'message': f'{full_user} Please specify the following attributes \
in order: name, rarity, drop weighting',
in order: name, rarity',
'attachment_urls': None
}
@ -97,17 +97,10 @@ in order: name, rarity, drop weighting',
be a number between 1 and 5',
'attachment_urls': None
}
if not (is_float(arguments[2]) and 0.0 < float(arguments[2]) <= 1.0):
return {
'message': f'{full_user} Invalid drop weight: \'{arguments[2]}\' \
must be a decimal value between 0.0 and 1.0',
'attachment_urls': None
}
character_id, file_id = add_character(
name=arguments[0],
rarity=int(arguments[1]),
weight=float(arguments[2]),
image_url=image_url
)
return {
@ -121,7 +114,7 @@ def do_help(author: str) -> BotResponse:
return {
'message': f'{author} Here\'s what I can do:\n\
- `roll` Pulls a random character.\n\
- `create <name> <rarity> <weight>` Creates a character using a given image.\n\
- `create <name> <rarity>` Creates a character using a given image.\n\
- `help` Shows this message.',
'attachment_urls': None
}