bot.py 396 B

12345678910111213141516
  1. from config import BOT_TOKEN, CHANNEL_ID, AGENT_ID, CUSTOM_DESCRIPTION
  2. import telebot
  3. bot = telebot.TeleBot(BOT_TOKEN)
  4. @bot.message_handler(content_types=['audio'])
  5. def get_audio(message):
  6. # if message.from_user.id == AGENT_ID:
  7. if True:
  8. audio_id = message.audio.file_id
  9. bot.send_audio(CHANNEL_ID, audio_id, CUSTOM_DESCRIPTION)
  10. bot.polling(none_stop=True, interval=0)