|
|
@ -1,10 +1,13 @@
|
|
|
|
#!/usr/bin/python3
|
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
|
|
|
|
import telebot
|
|
|
|
import telebot
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
sys.path.append("bot_config")
|
|
|
|
|
|
|
|
import bot_config as i
|
|
|
|
|
|
|
|
botToken = i.botToken
|
|
|
|
|
|
|
|
|
|
|
|
botToken = "5698919505:AAFQEQEzxxw7elxQItir4ofTF4KulCmDTLE"
|
|
|
|
|
|
|
|
bot = telebot.TeleBot(botToken)
|
|
|
|
bot = telebot.TeleBot(botToken)
|
|
|
|
chatId = "-752937487"
|
|
|
|
chatId = i.chatId
|
|
|
|
|
|
|
|
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
from watchdog.observers import Observer
|
|
|
|
from watchdog.observers import Observer
|
|
|
@ -18,6 +21,7 @@ if __name__ == "__main__":
|
|
|
|
my_event_handler = PatternMatchingEventHandler(patterns, ignore_patterns, ignore_directories, case_sensitive)
|
|
|
|
my_event_handler = PatternMatchingEventHandler(patterns, ignore_patterns, ignore_directories, case_sensitive)
|
|
|
|
|
|
|
|
|
|
|
|
def on_created(event):
|
|
|
|
def on_created(event):
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
bot.send_photo(chat_id=chatId, photo=open(event.src_path, 'rb'))
|
|
|
|
bot.send_photo(chat_id=chatId, photo=open(event.src_path, 'rb'))
|
|
|
|
|
|
|
|
|
|
|
|
my_event_handler.on_created = on_created
|
|
|
|
my_event_handler.on_created = on_created
|
|
|
|