Skip to content

Commit

Permalink
feat: added function to unban from callback
Browse files Browse the repository at this point in the history
  • Loading branch information
alepiaz committed Nov 30, 2023
1 parent 6620ffb commit 94a0844
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/spotted/handlers/job_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ async def clean_warned_users():
where="warn_time > %s",
where_args=(warn_expiration,),
)


async def unmute_user(context: CallbackContext):
"""A callback function that unmute the user
Args:
context: context passed by the job queue
"""
user = context.job.context
user.unmute(context.bot)

0 comments on commit 94a0844

Please sign in to comment.