Webhooks and run config
You can run bot using webhooks
Start bot using webhook
You can start a bot using webhooks. If you want to use webhooks in development, we recommend to using ngrok
Webhook config
You can read more about webhook config here
Webhook/polling 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 https://core.telegram.org/bots/api#setwebhook and this config is required (url field). If you're using long polling to run a bot (by default) your config is https://core.telegram.org/bots/api#getupdates (config optional)
Run config
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
Last updated