Webhooks and run config
You can run bot using webhooks
Last updated
You can run bot using webhooks
Last updated
You can start a bot using . If you want to use webhooks in development, we recommend to using
You can also pass run config (NestGram options) as 4th argument
runType
'webhook' | 'polling'
'polling'
How you want to run a bot: webhook or long polling
logging
boolean
true
If true, you will get logs about bot starting and getting updates in console
port
number
80
Port you want to run server using a webhook
fileLogging
boolean
true
If true, you will receive logs of received updates in nestgram/logs.md file
fileLoggingLimit
number
20
Log limit in nestgram/logs.md file
You can read more about webhook config
When you create the bot (NestGram class) you can pass config as 3rd argument. If you're using webhook to run a bot, your config is and this config is required (url field). If you're using long polling to run a bot (by default) your config is (config optional)