mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Add new script
This commit is contained in:
parent
f062c01ee1
commit
b8511344af
1 changed files with 14 additions and 0 deletions
14
chatasthebot.py
Normal file
14
chatasthebot.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import telegram
|
||||||
|
import configparser
|
||||||
|
config = configparser.ConfigParser()
|
||||||
|
config.read("config.ini")
|
||||||
|
|
||||||
|
|
||||||
|
telegram_bot = telegram.Bot(config["Telegram"]["bot_token"])
|
||||||
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
message = input()
|
||||||
|
telegram_bot.send_message(config["Telegram"]["main_group"], message,
|
||||||
|
parse_mode="HTML",
|
||||||
|
disable_web_page_preview=True)
|
Loading…
Reference in a new issue