High-level 'Telegram' 'MTProto' client. Create one with
TelegramClient$new(session, api_id, api_hash), then $start()
(interactive login) or $connect() together with
$send_code_request() and $sign_in() to authenticate. Once
connected it exposes the messaging, channel, media and download methods used
throughout the package documentation.
Details
This is an R6 class. Typical usage:
client <- TelegramClient$new("my_session", api_id = 123, api_hash = "...")
client$connect()Methods
Inherited methods
telegramR::TelegramBaseClient$clear_session_auth_key()telegramR::TelegramBaseClient$connect()telegramR::TelegramBaseClient$disconnect()telegramR::TelegramBaseClient$get_flood_sleep_threshold()telegramR::TelegramBaseClient$get_proxy()telegramR::TelegramBaseClient$get_session_path()telegramR::TelegramBaseClient$get_version()telegramR::TelegramBaseClient$is_connected()telegramR::TelegramBaseClient$set_dc()telegramR::TelegramBaseClient$set_flood_sleep_threshold()telegramR::TelegramBaseClient$set_proxy()telegramR::TelegramBaseClient$switch_dc()
Method start()
Method iter_admin_log()
Usage
TelegramClient$iter_admin_log(
entity,
limit = NULL,
max_id = 0,
min_id = 0,
search = NULL,
admins = NULL,
join = NULL,
leave = NULL,
invite = NULL,
restrict = NULL,
unrestrict = NULL,
ban = NULL,
unban = NULL,
promote = NULL,
demote = NULL,
info = NULL,
settings = NULL,
pinned = NULL,
edit = NULL,
delete = NULL,
group_call = NULL
)Method edit_permissions()
Usage
TelegramClient$edit_permissions(
entity,
user = NULL,
until_date = NULL,
view_messages = TRUE,
send_messages = TRUE,
send_media = TRUE,
send_stickers = TRUE,
send_gifs = TRUE,
send_games = TRUE,
send_inline = TRUE,
embed_link_previews = TRUE,
send_polls = TRUE,
change_info = TRUE,
invite_users = TRUE,
pin_messages = TRUE
)Method send_message()
Usage
TelegramClient$send_message(
entity,
message = "",
reply_to = NULL,
attributes = NULL,
parse_mode = NULL,
formatting_entities = NULL,
link_preview = TRUE,
file = NULL,
thumb = NULL,
force_document = FALSE,
clear_draft = FALSE,
buttons = NULL,
silent = NULL,
background = NULL,
supports_streaming = FALSE,
schedule = NULL,
comment_to = NULL,
nosound_video = NULL,
send_as = NULL,
message_effect_id = NULL
)Method send_file()
Method file_to_media()
Usage
TelegramClient$file_to_media(
file,
force_document = FALSE,
file_size = NULL,
progress_callback = NULL,
attributes = NULL,
thumb = NULL,
allow_cache = TRUE,
voice_note = FALSE,
video_note = FALSE,
supports_streaming = FALSE,
mime_type = NULL,
as_image = NULL,
ttl = NULL,
nosound_video = NULL
)Method call()
Method new()
Usage
TelegramClient$new(...)