Added missing await
This commit is contained in:
parent
0197c70d80
commit
4e2a2d3f28
|
@ -24,8 +24,9 @@ async def new_msg(update, context, regexes):
|
|||
break
|
||||
if is_spam:
|
||||
logging.info(f"Banning: {update.message}")
|
||||
update.message.chat.ban_member(update.message.from_user.id)
|
||||
update.message.delete()
|
||||
await update.message.chat.ban_member(update.message.from_user.id)
|
||||
await update.message.delete()
|
||||
logging.info("Banned.")
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(format='%(asctime)s|%(levelname)s|%(message)s', level=logging.INFO)
|
||||
|
|
Loading…
Reference in New Issue