lamark.blogg.se

Create own telegram bot
Create own telegram bot











create own telegram bot

On the other hand, removing events from this parameters will not automatically stop notifications for them (you need to turn them off for every channel with the /notify command). Note however, that at the buildbot restart or reconfig the notifications listed here will be turned on for the specified chats. This parameter can be changed during run-time by sending the /notify command to the bot.

create own telegram bot

It can also notify about missing workers and their return. Telegram bot can listen to build ‘start’ and ‘finish’ events. (tags functionality is not yet implemented) notify_eventsĪ list or set of events to be notified on the Telegram chats. When set, this bot will only communicate about builders containing those tags. To get it, talk to your bot or add it to a Telegram group and issue /getid command.Īuthz = ( 'getid' : True, '' :, ( 'force', 'stop' ):, )Īnybody will be able to run the getid command, users with IDs 123412 will be allowed to run any safe command and the user with ID 123456 will also have the right to force and stop builds. For channels it should have form and for private chats and groups it should be a numeric ID. List of chats IDs to send notifications specified in the notify_events parameter. For this reason it is advised to set this parameter to the correct value. However, in case of the connection problems, configuration of the Buildbot will be interrupted. If this parameter is missing, it will be retrieved from the Telegram server. This should be set to the the bot unique username defined in BotFather.

create own telegram bot

The following parameters are accepted by this class: bot_tokenīot token given by BotFather. TelegramBot ( bot_token = 'bot_token_given_by_botfather', bot_username 'username_set_in_botfather_bot', chat_ids =, authz = notify_events =, usePolling = True ) c. From ugins import reporters telegram = reporters.













Create own telegram bot