Skip to content

Commit

Permalink
Ahh
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Dec 7, 2024
1 parent f22e7dc commit 96f4064
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def start(client, message):
elif len(message.command) > 1 and len(message.command[1]) == 36:
userid = message.from_user.id
input_token = message.command[1]
stored_token = await Database().get_user_token(userid)
stored_token = await Database.get_user_token(userid)
if stored_token is None:
return await send_message(
message,
Expand All @@ -146,7 +146,7 @@ async def start(client, message):
data["token"] = token
data["time"] = token_time
user_data[userid].update(data)
await Database().update_user_tdata(userid, token, token_time)
await Database.update_user_tdata(userid, token, token_time)
msg = "Your token has been successfully generated!\n\n"
msg += f'It will be valid for {get_readable_time(int(config_dict["TOKEN_TIMEOUT"]), True)}'
return await send_message(message, msg)
Expand All @@ -156,7 +156,7 @@ async def start(client, message):
await send_message(message, start_string)
else:
await send_message(message, "You are not a authorized user!")
await Database().update_pm_users(message.from_user.id)
await Database.update_pm_users(message.from_user.id)
return None


Expand Down
2 changes: 1 addition & 1 deletion bot/helper/aeon_utils/access_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async def token_check(user_id, button=None):
if expire is not None:
del data["time"]
data["token"] = token
await Database().update_user_token(user_id, token)
await Database.update_user_token(user_id, token)
user_data[user_id] = data

time_str = get_readable_time(token_timeout, True)
Expand Down
4 changes: 2 additions & 2 deletions bot/modules/broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def broadcast(_, message):
updater = time()
broadcast_message = await send_message(message, "Broadcast in progress...")

for uid in await Database().get_pm_uids():
for uid in await Database.get_pm_uids():
try:
await message.reply_to_message.copy(uid)
successful += 1
Expand All @@ -37,7 +37,7 @@ async def broadcast(_, message):
await message.reply_to_message.copy(uid)
successful += 1
except (UserIsBlocked, InputUserDeactivated):
await Database().rm_pm_user(uid)
await Database.rm_pm_user(uid)
blocked += 1
except Exception:
unsuccessful += 1
Expand Down

0 comments on commit 96f4064

Please sign in to comment.