2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 14:38:04 +00:00

fuck edits, all my homies do things the first way they tried

also my homies dont exist
This commit is contained in:
Nick80835
2020-06-21 23:34:31 -04:00
parent 8a4a8d6cca
commit eaa3c06a1d
3 changed files with 15 additions and 33 deletions

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from asyncio import sleep
from time import time_ns
from telethon import Button
@@ -136,17 +135,12 @@ async def danbooru_buttons(event):
await event.reply(f"Failed to find URLs for query: {event.args}")
return
button_msg = await event.reply(
dan_button_dict[f"{event.chat.id}_{event.id}"] = [0, valid_urls]
await event.reply(
f"[sauce]({DAN_SAUCE_URL}{valid_urls[0][1]})",
file=valid_urls[0][0]
)
dan_button_dict[f"{event.chat.id}_{button_msg.id}"] = [0, valid_urls]
await sleep(1)
await button_msg.edit(
buttons=[Button.inline('➡️', f'dan*{event.chat.id}_{button_msg.id}*r')]
file=valid_urls[0][0],
buttons=[Button.inline('➡️', f'dan*{event.chat.id}_{event.id}*r')]
)

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from asyncio import sleep
from random import choice
from time import time_ns
@@ -146,17 +145,12 @@ async def gelbooru_buttons(event):
await event.reply(f"Failed to find URLs for query: {event.args}")
return
button_msg = await event.reply(
gel_button_dict[f"{event.chat.id}_{event.id}"] = [0, valid_urls]
await event.reply(
f"[sauce]({GEL_SAUCE_URL}{valid_urls[0][1]})",
file=valid_urls[0][0]
)
gel_button_dict[f"{event.chat.id}_{button_msg.id}"] = [0, valid_urls]
await sleep(1)
await button_msg.edit(
buttons=[Button.inline('➡️', f'gel*{event.chat.id}_{button_msg.id}*r')]
file=valid_urls[0][0],
buttons=[Button.inline('➡️', f'gel*{event.chat.id}_{event.id}*r')]
)

View File

@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from asyncio import sleep
from time import time_ns
from telethon import Button
@@ -137,17 +136,12 @@ async def sankaku_buttons(event):
await event.reply(f"Failed to find URLs for query: {event.args}")
return
button_msg = await event.reply(
san_button_dict[f"{event.chat.id}_{event.id}"] = [0, valid_urls]
await event.reply(
f"[sauce]({SAN_SAUCE_URL}{valid_urls[0][1]})",
file=valid_urls[0][0]
)
san_button_dict[f"{event.chat.id}_{button_msg.id}"] = [0, valid_urls]
await sleep(1)
await button_msg.edit(
buttons=[Button.inline('➡️', f'san*{event.chat.id}_{button_msg.id}*r')]
file=valid_urls[0][0],
buttons=[Button.inline('➡️', f'san*{event.chat.id}_{event.id}*r')]
)