I have this code
JavaScript
x
9
1
import time
2
from time import time
3
bot = telebot.TeleBot('<MY-BOT-TOKEN>')
4
@bot.message_handler(content_types=[
5
"new_chat_members"
6
])
7
def mut(message):
8
bot.restrict_chat_member(message.chat.id, USER_ID , until_date=time()+86400)
9
It listens for new users, and it has mute command, but how can i get their ID with TeleBot?
Advertisement
Answer
JavaScript
1
3
1
def mut(message):
2
bot.restrict_chat_member(message.chat.id, message.from_user.id, until_date=time()+86400)
3