A simple method for testing your bot's auth token. Requires no parameters. Returns: :class:`telegram.User`: A :class:`telegram.User` instance representing that bot if the credentials are valid, :obj:`None` otherwise.
(
self,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
)
| 988 | return return_type.de_json(result, self) |
| 989 | |
| 990 | async def get_me( |
| 991 | self, |
| 992 | *, |
| 993 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 994 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 995 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 996 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 997 | api_kwargs: JSONDict | None = None, |
| 998 | ) -> User: |
| 999 | """A simple method for testing your bot's auth token. Requires no parameters. |
| 1000 | |
| 1001 | Returns: |
| 1002 | :class:`telegram.User`: A :class:`telegram.User` instance representing that bot if the |
| 1003 | credentials are valid, :obj:`None` otherwise. |
| 1004 | """ |
| 1005 | result = await self._post( |
| 1006 | "getMe", |
| 1007 | read_timeout=read_timeout, |
| 1008 | write_timeout=write_timeout, |
| 1009 | connect_timeout=connect_timeout, |
| 1010 | pool_timeout=pool_timeout, |
| 1011 | api_kwargs=api_kwargs, |
| 1012 | ) |
| 1013 | self._bot_user = User.de_json(result, self) |
| 1014 | return self._bot_user |
| 1015 | |
| 1016 | async def send_message( |
| 1017 | self, |