Mods
This commit is contained in:
parent
cf9f9eacc0
commit
bd32a97e6c
9
main.py
9
main.py
|
@ -52,6 +52,12 @@ def extract_range(string):
|
||||||
def clean_list(lst):
|
def clean_list(lst):
|
||||||
return list(filter(lambda x: x != "", lst))
|
return list(filter(lambda x: x != "", lst))
|
||||||
|
|
||||||
|
def string_to_number(input_string):
|
||||||
|
hash_value = hash(input_string)
|
||||||
|
absolute_hash = abs(hash_value)
|
||||||
|
scaled_number = absolute_hash % 1000
|
||||||
|
return scaled_number
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"User-Agent": "gluebot",
|
"User-Agent": "gluebot",
|
||||||
"Origin": "https://deek.chat",
|
"Origin": "https://deek.chat",
|
||||||
|
@ -213,6 +219,9 @@ async def gif_numbers(arg, room_id):
|
||||||
if numbers[0] < numbers[1]:
|
if numbers[0] < numbers[1]:
|
||||||
num = random_int(numbers[0], numbers[1])
|
num = random_int(numbers[0], numbers[1])
|
||||||
|
|
||||||
|
if num == -1:
|
||||||
|
num = string_to_number(arg)
|
||||||
|
|
||||||
if num < 0:
|
if num < 0:
|
||||||
num = random_int(0, 999)
|
num = random_int(0, 999)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue