MadelineProtoDocs/docs/get_self.md

26 lines
416 B
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: get_self
description: get_self parameters, return type and example
---
## Method: get_self
Gets info about the currently logged-in user.
No parameters
### Return type: [User object](API_docs/types/User.md)
2019-06-01 18:08:28 +02:00
### Example ([now fully async!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
2018-04-01 13:19:25 +02:00
```php
2019-06-01 18:08:28 +02:00
$User = yield $MadelineProto->get_self();
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
```lua
2018-04-01 13:19:25 +02:00
User = get_self()
```