Skip to content

Commit

Permalink
Update pixelateTG.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arbadacarbaYK authored May 31, 2024
1 parent adaeffb commit 11b7dc1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pixelateTG.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ def pixelate_faces(update: Update, context: CallbackContext) -> None:


def pixelate_command(update: Update, context: CallbackContext) -> None:
if update.message.reply_to_message and (update.message.reply_to_message.photo or update.message.reply_to_message.document.mime_type == 'image/gif'):
session_id = str(uuid4())
chat_data = context.chat_data
session_id = str(uuid4())
chat_data = context.chat_data

if update.message.reply_to_message and (update.message.reply_to_message.photo or update.message.reply_to_message.document.mime_type == 'image/gif'):
if update.message.reply_to_message.photo:
file_id = update.message.reply_to_message.photo[-1].file_id
file = context.bot.get_file(file_id)
Expand Down Expand Up @@ -287,7 +287,8 @@ def pixelate_command(update: Update, context: CallbackContext) -> None:
# Clean up temporary files
os.remove(gif_path)
else:
update.message.reply_text('Please reply to a photo or a GIF with the /pixelate command.')
update.message.reply_text('Please reply to a photo



def main() -> None:
Expand Down

0 comments on commit 11b7dc1

Please sign in to comment.