module Tourmaline::Client::TDLightMethods
#
Direct including types
Tourmaline::Client
Methods#
#delete_messages(chat, start_id, end_id)
#
(chat, start_id, end_id)
Delete all messages from start_id
to end_id
. start_id
must be less than end_id
and both must be positive, non-zero numbers.
Warning
This is a tdlight only method. It will not work with the standard bot API. This method does not work in private chats or normal group. It is also not suggested to delete more than 200 messages per call.
#get_memory_stats
#
Return a JSON object containing the info about the memory manager, more info here.
Warning
This is a tdlight only method. It will not work with the standard bot API.
#get_participants(chat)
#
(chat)
Return a list of members in the given chat. Raises ChatNotFound if your bot is not a member of the requested chat.
Warning
This is a tdlight only method. It will not work with the standard bot API.
Additionally this request is heavily rate limited by Telegram. Use sparingly.
#login(phone_number)
#
(phone_number)
Log in to the server in "user mode". This allows you to log in with your user account instead of a bot account.
Warning
This is a tdlight only method. It will not work with the standard bot API.
#optimize_memory
#
Remove old data from the in-memory cache and give the freed memory back to the os. Returns true on success.
Warning
This is a tdlight only method. It will not work with the standard bot API.
#ping
#
Send an MTProto ping message to the telegram servers. Useful to detect the delay of the bot api server. Returns the response time in milliseconds.
Warning
This is a tdlight only method. It will not work with the standard bot API.
#register_user(first_name, last_name = nil)
#
(first_name, last_name = nil)
Register a user with Telegram. Must be called after #login
and #send_code
.
Returns true on success.
Warning
This is a tdlight only method. It will not work with the standard bot API. Additionally, user registration is disabled by default in TDLight. To enable it please see the TDLight docs.
#send_code(code)
#
(code)
Finish authenticating in "user mode" by providing the auth code that Telegram sent you.
Warning
This is a tdlight only method. It will not work with the standard bot API.