MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / BotName

Class BotName

src/telegram/_botname.py:28–55  ·  view source on GitHub ↗

This object represents the bot's name. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`name` is equal. .. versionadded:: 20.3 Args: name (:obj:`str`): The bot's name. Attributes: name (

Source from the content-addressed store, hash-verified

26
27
28class BotName(TelegramObject):
29 """This object represents the bot's name.
30
31 Objects of this class are comparable in terms of equality. Two objects of this class are
32 considered equal, if their :attr:`name` is equal.
33
34 .. versionadded:: 20.3
35
36 Args:
37 name (:obj:`str`): The bot's name.
38
39 Attributes:
40 name (:obj:`str`): The bot's name.
41
42 """
43
44 __slots__ = ("name",)
45
46 def __init__(self, name: str, *, api_kwargs: JSONDict | None = None):
47 super().__init__(api_kwargs=api_kwargs)
48 self.name: str = name
49
50 self._id_attrs = (self.name,)
51
52 self._freeze()
53
54 MAX_LENGTH: Final[int] = constants.BotNameLimit.MAX_NAME_LENGTH
55 """:const:`telegram.constants.BotNameLimit.MAX_NAME_LENGTH`"""

Callers 4

test_set_get_my_nameMethod · 0.90
bot_nameFunction · 0.90
test_equalityMethod · 0.90
dummy_objects.pyFile · 0.90

Calls

no outgoing calls

Tested by 3

test_set_get_my_nameMethod · 0.72
bot_nameFunction · 0.72
test_equalityMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…