Skip to content

Commit

Permalink
Update pixelateTG.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arbadacarbaYK authored Jun 9, 2024
1 parent 9917997 commit d723e7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pixelateTG.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ def handle_gif_or_video(update: Update, context: CallbackContext) -> None:
else:
update.message.reply_text('Please send either a GIF or a video.')

def pixelate_command(update: Update, context: CallbackContext) -> None:
"""Handles the /pixel command to pixelate faces in a photo, GIF, or video. Applicable for both DMs and groups."""
if update.message.reply_to_message and (update.message.reply_to_message.photo or update.message.reply_to_message.document):
context.args = ['pixelate']
pixelate_faces(update, context)
else:
update.message.reply_text('Please reply to a photo, GIF, or video to pixelate faces.')


def button_callback(update: Update, context: CallbackContext) -> None:
"""Handles button presses for selecting overlays or pixelation. Applicable for both DMs and groups."""
query = update.callback_query
Expand Down

0 comments on commit d723e7a

Please sign in to comment.