Advertisement
cicwak

Untitled

May 25th, 2022
833
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import vk_api
  2.  
  3. from vk_api.bot_longpoll import VkBotLongPoll, VkBotEvent, VkBotMessageEvent, VkBotEventType
  4.  
  5. TOKEN = "fa7a611f83a8a029542ad40567ccc70cf49b3957633e9e5bcfd0db76fd33b781812d76b493db63e2917aa"
  6. BOT_ID = 213523488
  7.  
  8. vk_session = vk_api.VkApi(token=TOKEN)
  9. longpoll = VkBotLongPoll(vk=vk_session, group_id=BOT_ID) # Авторизация токена.
  10.  
  11.  
  12. def main():
  13.     for event in longpoll.listen():
  14.         if event.type == VkBotEventType.MESSAGE_NEW:
  15.             print(11111111111)
  16.  
  17.  
  18. if __name__ == '__main__':
  19.     main()
  20.  
Advertisement
RAW Paste Data Copied
Advertisement