Skip to content

Commit 272d114

Browse files
committed
add: main
1 parent 3d1cbec commit 272d114

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

main.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
from news_bot import BotTelegramNews
2-
from keys import TOKEN_API_TELEGRAM,API_NEW_TOKEN
2+
from keys import TOKEN_API_TELEGRAM,API_NEW_TOKEN,CHANNEL_ID
33
import schedule
44
import time
55

66

77

88

99
if __name__ == '__main__':
10-
bot = BotTelegramNews('NewsBot', TOKEN_API_TELEGRAM, API_NEW_TOKEN)
10+
bot = BotTelegramNews('NewsBot', TOKEN_API_TELEGRAM, API_NEW_TOKEN, CHANNEL_ID)
1111
bot.esperar_comando("start", bot.start)
1212
bot.esperar_comando("menu", bot.menu_conf)
1313
bot.contestar_consulta(bot.getNewMessage)
14-
14+
15+
schedule.every(50).minutes.do(bot.sendSportNews)
1516
schedule.every(1).hours.do(bot.backupAPI)
1617
while True:
1718
schedule.run_pending()
18-
time.sleep(1)
19-
20-
21-
22-
23-
24-
19+
time.sleep(1)

0 commit comments

Comments
 (0)