MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / close

Method close

telebot/__init__.py:1475–1487  ·  view source on GitHub ↗

Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 m

(self)

Source from the content-addressed store, hash-verified

1473
1474
1475 def close(self) -> bool:
1476 """
1477 Use this method to close the bot instance before moving it from one local server to another.
1478 You need to delete the webhook before calling this method to ensure that the bot isn't launched again
1479 after server restart.
1480 The method will return error 429 in the first 10 minutes after the bot is launched.
1481 Returns True on success.
1482
1483 Telegram documentation: https://core.telegram.org/bots/api#close
1484
1485 :return: :obj:`bool`
1486 """
1487 return apihelper.close(self.token)
1488
1489 def set_message_reaction(self, chat_id: Union[int, str], message_id: int, reaction: Optional[List[types.ReactionType]]=None, is_big: Optional[bool]=None) -> bool:
1490 """

Callers 2

run_webhooksMethod · 0.45
stop_botMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected