MCPcopy Index your code
hub / github.com/InstaPy/InstaPy / _clean_web_hooks

Method _clean_web_hooks

instapy/plugins/telegram_util.py:260–271  ·  view source on GitHub ↗

make sure no web_hooks are configured already otherwise telegram will respond 409 :return:

(self)

Source from the content-addressed store, hash-verified

258 return True
259
260 def _clean_web_hooks(self):
261 """
262 make sure no web_hooks are configured already otherwise telegram
263 will respond 409
264 :return:
265 """
266 r = requests.get(
267 "https://api.telegram.org/bot{}/deleteWebhook".format(self.token)
268 )
269
270 if r.json()["ok"] is not True:
271 self.__logger.warning("unable to remove webhook! Wrong token?")
272
273 def _error_callback(self, update, error):
274 try:

Callers 1

telegram_botMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected