Skip to content

Commit

Permalink
Update Miscellaneous.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MekhyW committed Sep 7, 2024
1 parent 38e0e7d commit f0372a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bot/Miscellaneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def pesh(cookiebot, msg, chat_id, language, photo, image_id):
def custom_command(cookiebot, msg, chat_id, language):
send_chat_action(cookiebot, chat_id, 'upload_photo')
bloblist = list(storage_bucket.list_blobs(prefix="Custom/"+msg['text'].replace('/', '').replace("@CookieMWbot", '')))
if msg['text'].split() > 1 and msg['text'].split()[1].isdigit():
if len(msg['text'].split()) > 1 and msg['text'].split()[1].isdigit():
image_id = int(msg['text'].split()[1])
else:
image_id = random.randint(0, len(bloblist)-1)
Expand Down

0 comments on commit f0372a5

Please sign in to comment.