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

Method delete

telebot/states/sync/context.py:74–89  ·  view source on GitHub ↗

Deletes state and data for current user. .. warning:: This method deletes state and associated data for current user.

(self)

Source from the content-addressed store, hash-verified

72 )
73
74 def delete(self) -> bool:
75 """
76 Deletes state and data for current user.
77
78 .. warning::
79
80 This method deletes state and associated data for current user.
81 """
82 chat_id, user_id, business_connection_id, bot_id, message_thread_id = resolve_context(self.message, self.bot.bot_id)
83 return self.bot.delete_state(
84 chat_id=chat_id,
85 user_id=user_id,
86 business_connection_id=business_connection_id,
87 bot_id=bot_id,
88 message_thread_id=message_thread_id
89 )
90
91 def reset_data(self) -> bool:
92 """

Callers 9

any_stateFunction · 0.45
finishFunction · 0.45
any_stateFunction · 0.45
finishFunction · 0.45
clear_handlersMethod · 0.45
delete_stateMethod · 0.45
migrate_formatMethod · 0.45
delete_stateMethod · 0.45
migrate_formatMethod · 0.45

Calls 2

resolve_contextFunction · 0.90
delete_stateMethod · 0.45

Tested by

no test coverage detected