Advertisement
Guest User

Untitled

a guest
Sep 12th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.99 KB | None | 0 0
  1. import telebot
  2. import random
  3. import os
  4.  
  5. file = open("token.txt","r")
  6. token = file.readline()
  7. bot = telebot.TeleBot(token)
  8. yes_or_no = ["heri","yox"]
  9. istOfRandomPhrases = ["мать,чеферни на мобилу", "как вы братва?","Как же ты меня заебал",'какие-то проблемы?',"лол","ну что молодые, нарушаем?"
  10.                       ,"тебе нечего делать?","иди уроки делай","завтра на торговую или гм????","teze tema var? ", "nә var nә yox?"]
  11. random_message = lambda: random.choice(yes_or_no)
  12. random_phrase = lambda: random.choice(istOfRandomPhrases)
  13.  
  14. path="meyxanalar"
  15. files=os.listdir(path)
  16. d=random.choice(files)
  17.  
  18.  
  19. # Handles all sent documents and audio files
  20. @bot.message_handler(content_types=['audio'])
  21. def handle_docs_audio(message):
  22.     bot.reply_to(message,"Обааа это трек такой???")
  23.  
  24. @bot.message_handler(commands=['help'])
  25. def send_welcome(message):
  26.     bot.reply_to(message, "sikim,ver yatimda ala")
  27.  
  28.  
  29. @bot.message_handler(commands=['am_i_gisdallax'])
  30. def am_i_gisdallax(message,):
  31.     bot.reply_to(message, random_message())
  32.  
  33.  
  34. @bot.message_handler(commands=['am_i_beautiful'])
  35. def am_i_beautiful(message,):
  36.     bot.reply_to(message, random_message())
  37.  
  38. @bot.message_handler(content_types=['location'])
  39. def location(message,):
  40.     bot.reply_to(message, "мы уже выехали")
  41.  
  42. @bot.message_handler(content_types=['new_chat_title'])
  43. def new_chat_title(message,):
  44.     bot.reply_to(message, "пере обуваемся?")
  45.  
  46. @bot.message_handler(content_types=['new_chat_participant'])
  47. def new_chat_participian(message,):
  48.     bot.reply_to(message, "Cалам,веди себя достойно")
  49.  
  50.  
  51.  
  52. @bot.message_handler(commands=['soz_at'])
  53. def phrases(message):
  54.     bot.reply_to(message, random_phrase())
  55.  
  56. @bot.message_handler(commands=['meyxana'])
  57.  
  58. def meyxana(m):
  59.     bot.send_audio(m.chat.id,d,timeout=60)
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. bot.polling(none_stop=True)
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement