Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anasty17 authored May 15, 2024
1 parent 86b868f commit f2321f4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bot/modules/bot_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ async def edit_bot_settings(client, query):
rfunc = partial(update_buttons, message, "var")
await event_handler(client, query, pfunc, rfunc)
elif data[1] == "botvar" and STATE == "view":
value = config_dict[data[2]]
if len(str(value)) > 200:
value = f"{config_dict[data[2]]}"
if len(value) > 200:
await query.answer()
with BytesIO(str.encode(value)) as out_file:
out_file.name = f"{data[2]}.txt"
Expand All @@ -778,8 +778,8 @@ async def edit_bot_settings(client, query):
rfunc = partial(update_buttons, message, "aria")
await event_handler(client, query, pfunc, rfunc)
elif data[1] == "ariavar" and STATE == "view":
value = aria2_options[data[2]]
if len(str(value)) > 200:
value = f"{aria2_options[data[2]]}"
if len(value) > 200:
await query.answer()
with BytesIO(str.encode(value)) as out_file:
out_file.name = f"{data[2]}.txt"
Expand All @@ -795,8 +795,8 @@ async def edit_bot_settings(client, query):
rfunc = partial(update_buttons, message, "qbit")
await event_handler(client, query, pfunc, rfunc)
elif data[1] == "qbitvar" and STATE == "view":
value = qbit_options[data[2]]
if len(str(value)) > 200:
value = f"{qbit_options[data[2]]}"
if len(value) > 200:
await query.answer()
with BytesIO(str.encode(value)) as out_file:
out_file.name = f"{data[2]}.txt"
Expand All @@ -812,8 +812,8 @@ async def edit_bot_settings(client, query):
rfunc = partial(update_buttons, message, "nzb")
await event_handler(client, query, pfunc, rfunc)
elif data[1] == "nzbvar" and STATE == "view":
value = nzb_options[data[2]]
if len(str(value)) > 200:
value = f"{nzb_options[data[2]]}"
if len(value) > 200:
await query.answer()
with BytesIO(str.encode(value)) as out_file:
out_file.name = f"{data[2]}.txt"
Expand Down Expand Up @@ -844,8 +844,8 @@ async def edit_bot_settings(client, query):
await event_handler(client, query, pfunc, rfunc)
elif data[1].startswith("nzbsevar") and STATE == "view":
index = int(data[1].replace("nzbsevar", ""))
value = config_dict["USENET_SERVERS"][index][data[2]]
if len(str(value)) > 200:
value = f"{config_dict["USENET_SERVERS"][index][data[2]]}"
if len(value) > 200:
await query.answer()
with BytesIO(str.encode(value)) as out_file:
out_file.name = f"{data[2]}.txt"
Expand Down

0 comments on commit f2321f4

Please sign in to comment.