Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

TelegramBot

Guides

  • TelegramBot Guide

Symbols

  • CreateBotSession
  • DeployBotWebhook
  • getMe
  • getUpdates
  • HandleBotUpdates
  • ImportTelegramFile
  • Object
  • sendMessage
  • sendPhoto
  • TelegramBot
KirillBelov`TelegramBot`
HandleBotUpdates
​
HandleBotUpdates
[bot]
handle
bot
updates
​
​
HandleBotUpdates
[bot,updateHandler]
handle
bot
updates using specific updateHandler
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
Create the Bot:
In[1]:=
bot=
TelegramBot
["1247031088:AAGW73yzggrm4Tr7bldGCCaIrrwISNsdDzg"]
Out[1]=
TelegramBot
Name: WolframKernelBot

I sent a message to the Bot:
Check current updates:
In[2]:=
getUpdates
[bot]
Out[2]=
okTrue,result{update_id298047498,messagemessage_id1956,fromid490138492,is_botFalse,first_nameKirill,last_nameBelov,usernameKirillBelovTest,language_coderu,chatid490138492,first_nameKirill,last_nameBelov,usernameKirillBelovTest,typeprivate,date1671521120,textHi! Can you process all updates?}
Create an update handler:
In[3]:=
updateHandler[bot_TelegramBot,update_]:=​​
sendMessage
[bot,update["message","chat","id"],"yes"]
And use it for processing all updates:
In[4]:=
HandleBotUpdates
[bot,updateHandler]
Out[4]=
okTrue,result{}
Bot replyed to me:
Another way to use this method set update handler function as property of the bot named "UpdateHandler":
In[5]:=
bot["UpdateHandler"]=updateHandler
Out[5]=
updateHandler
I sent a message one more time:
And try to process this with default handler:
In[6]:=
HandleBotUpdates
[bot]
Out[6]=
okTrue,result{}
And result is:
SeeAlso
TelegramBot
 
▪
getUpdates
RelatedGuides
▪
TelegramBot Guide
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com