I can help you create and manage Telegram bots. If you're new to the Bot API, please see the manual (https://core.telegram.org/bots).
You can control me by sending these commands:
/newbot - create a new bot
/mybots - edit your bots [beta]
Edit Bots
/setname - change a bot's name
/setdescription - change bot description
/setabouttext - change bot about info
/setuserpic - change bot profile photo
/setcommands - change the list of commands
/deletebot - delete a bot
Bot Settings
/token - generate authorization token
/revoke - revoke bot access token
/setinline - toggle inline mode (https://core.telegram.org/bots/inline)
/setinlinegeo - toggle inline location requests (https://core.telegram.org/bots/inline#location-based-results)
/setinlinefeedback - change inline feedback (https://core.telegram.org/bots/inline#collecting-feedback) settings
/setjoingroups - can your bot be added to groups?
/setprivacy - toggle privacy mode (https://core.telegram.org/bots#privacy-mode) in groups
Games
/mygames - edit your games (https://core.telegram.org/bots/games) [beta]
/newgame - create a new game (https://core.telegram.org/bots/games)
/listgames - get a list of your games
/editgame - edit a game
/deletegame - delete an existing game
หากต้องการสร้างบอทใหม่ ให้ส่งคำสั่ง /newbot.
BotFather จะขอให้คุณป้อนชื่อและล็อกอินของบอท
BotFather, [25.07.20 09:39]
Alright, a new bot. How are we going to call it? Please choose a name for your bot.
Alexey Seleznev, [25.07.20 09:40]
My Test Bot
BotFather, [25.07.20 09:40]
Good. Now let's choose a username for your bot. It must end in `bot`. Like this, for example: TetrisBot or tetris_bot.
Alexey Seleznev, [25.07.20 09:40]
@my_test_bot
Done! Congratulations on your new bot. You will find it at t.me/my_test_bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API:
123456789:abcdefghijklmnopqrstuvwxyz
For a description of the Bot API, see this page: https://core.telegram.org/bots/api
ต่อไปคุณจะต้องใช้โทเค็น API ที่ได้รับในตัวอย่างของฉัน 123456789:abcdefghijklmnopqrstuvwxyz.
library(telegram.bot)
# создаём экземпляр бота
bot <- Bot(token = "123456789:abcdefghijklmnopqrstuvwxyz")
# Запрашиваем информацию о боте
print(bot$getMe())
# Получаем обновления бота, т.е. список отправленных ему сообщений
updates <- bot$getUpdates()
# Запрашиваем идентификатор чата
# Примечание: перед запросом обновлений вы должны отправить боту сообщение
chat_id <- updates[[1L]]$from_chat_id()
เขียนเส้นทางไปยังโฟลเดอร์ที่ติดตั้ง R ไว้ในตัวแปรระบบ Path บน Windows เส้นทางจะเป็นดังนี้: C:Program FilesRR-4.0.2bin.
สร้างไฟล์ค้างคาวปฏิบัติการที่มีเพียงบรรทัดเดียว R CMD BATCH C:rscriptscheck_botcheck_bot.R. แทนที่ C:rscriptscheck_botcheck_bot.R ไปยังเส้นทางแบบเต็มไปยังไฟล์ R ของคุณ
จากนั้น ใช้ Windows Task Scheduler เพื่อตั้งค่ากำหนดเวลาเริ่มต้น เช่น ทุกครึ่งชั่วโมง
ฉันได้อธิบายงานในการตรวจสอบ Windows Task Scheduler แต่คุณสามารถใช้เนื้อหาในบทความนี้เพื่อส่งการแจ้งเตือนใด ๆ ตั้งแต่การพยากรณ์อากาศไปจนถึงราคาหุ้นในตลาดหลักทรัพย์ เนื่องจาก R ช่วยให้คุณเชื่อมต่อกับแหล่งข้อมูลจำนวนมาก