2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-30 22:16:05 +00:00

tweak nsfw check in booru

This commit is contained in:
Nick80835
2023-02-05 12:33:39 -05:00
parent 601890f3af
commit 7e8abbc330

View File

@@ -56,7 +56,7 @@ async def booru(event):
for image in images:
try:
if event.chat_db.spoiler_nsfw and (event.object.nsfw or event.extra[0]._get_rating("x") in image[3]):
if event.chat_db.spoiler_nsfw and event.extra[0]._get_rating("x") in image[3]:
if bool(event.other_args[1]):
file = InputMediaDocumentExternal(url=image[0], spoiler=True)
else:
@@ -103,7 +103,7 @@ async def booru_buttons(event):
event.extra[1][f"{event.chat.id}_{event.id}"] = [0, images]
if event.chat_db.spoiler_nsfw and (event.object.nsfw or event.extra[0]._get_rating("x") in images[0][3]):
if event.chat_db.spoiler_nsfw and event.extra[0]._get_rating("x") in images[0][3]:
file = InputMediaPhotoExternal(url=images[0][0], spoiler=True)
else:
file = images[0][0]