Sample Telegram Bot.
/mychatid: returns the user chat id if sent directly or, if sent from a group, the group idCan be extended to implement other commands.
/newbot and take note of your token/setcommands, sending a content like the one belowmychatid - Send me back the chat id / group id
https://api.telegram.org/bot<your bot token>/setWebhook{
"url": "https://<server><path>"
}
/mychatid@<your bot> within the groupYou can export the following environment variables, to customize the bot:
HTTP_PORT: http port to listen to. Defaults to 8080.ENDPOINT: url path invoked by Telegram webhooks. Must be the same <path> used in setWebhook. Defaults to '/'.Listening on https://<your server>:8080
docker run -p 8080:8080 paolodenti/chatidbot
Listening on https://<your server>:443/mysecretpath
docker run -p 443:8888 -e HTTP_PORT=8888 -e ENDPOINT="/mysecretpath" paolodenti/chatidbot
Content type
Image
Digest
Size
39.5 MB
Last updated
over 5 years ago
docker pull paolodenti/chatidbot