Работа с телеграм API: различия между версиями
Sergahell (обсуждение | вклад) |
Sergahell (обсуждение | вклад) |
||
(не показаны 3 промежуточные версии этого же участника) | |||
Строка 5: | Строка 5: | ||
[[tg_deleteMessage|🔗 Удалить сообщение]] | [[tg_deleteMessage|🔗 Удалить сообщение]] | ||
− | + | Use this method to delete a message, including service messages, with the following limitations: | |
+ | - A message can only be deleted if it was sent less than 48 hours ago. | ||
+ | - Bots can delete outgoing messages in private chats, groups, and supergroups. | ||
+ | - Bots can delete incoming messages in private chats. | ||
+ | - Bots granted can_post_messages permissions can delete outgoing messages in channels. | ||
+ | - If the bot is an administrator of a group, it can delete any message there. | ||
+ | - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there. | ||
+ | Returns True on success. | ||
+ | |||
+ | == tg_editmessagecaption == | ||
+ | [[tg_editmessagecaption|🔗 Отредактировать заголовок]] | ||
+ | |||
+ | Use this method to edit captions of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. | ||
+ | |||
+ | == tg_editmessagemedia == | ||
+ | [[tg_editmessagemedia|🔗 Отредактировать медиа]] | ||
+ | |||
+ | Use this method to edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned. | ||
+ | |||
+ | == tg_editmessagereplymarkup == | ||
+ | [[tg_editmessagereplymarkup|🔗 Отредактировать только кнопки]] | ||
+ | |||
+ | Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. | ||
+ | |||
+ | == tg_editmessagetext == | ||
+ | [[tg_editmessagetext|🔗 Отредактировать сообщение]] | ||
+ | |||
+ | Use this method to edit text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned. | ||
+ | |||
+ | == tg_exportchatinvitelink == | ||
+ | [[tg_exportchatinvitelink|🔗 Выгрузить ссылку на чат]] | ||
+ | |||
+ | == tg_forwardmessage == | ||
+ | [[tg_forwardmessage|🔗 Переслать сообщение]] | ||
+ | |||
+ | == tg_getchat == | ||
+ | [[tg_getchat|🔗 Получить информацию о чате]] | ||
+ | |||
+ | == tg_getchatadministrators == | ||
+ | [[tg_getchatadministrators|🔗 Получить список администраторов]] | ||
+ | |||
+ | == tg_getchatmember == | ||
+ | [[tg_getchatmember|🔗 ПОлучить информацию о члене]] | ||
+ | |||
+ | == tg_getchatmemberscount == | ||
+ | [[tg_getchatmemberscount|🔗 Получить количество участников]] | ||
+ | |||
+ | == tg_getMe == | ||
+ | [[tg_getMe|🔗 Получить информацию о боте]] | ||
+ | |||
+ | == tg_kickchatmember == | ||
+ | [[tg_kickchatmember|🔗 Выгнать пользователя из чата]] | ||
+ | |||
+ | == tg_leavechat == | ||
+ | [[tg_leavechat|🔗 Покинуть чат]] | ||
+ | |||
+ | == tg_pinchatmessage == | ||
+ | [[tg_pinchatmessage|🔗 Запинить сообщение]] | ||
+ | |||
+ | == tg_promotechatmember == | ||
+ | [[tg_promotechatmember|🔗 Повысить права пользователя]] | ||
+ | |||
+ | == tg_restrictchatmember == | ||
+ | [[tg_restrictchatmember|🔗 Ограничить пользователя]] | ||
+ | |||
+ | == tg_sendanimation == | ||
+ | [[tg_sendanimation|🔗 Отправить анимацию]] | ||
+ | |||
+ | == tg_sendaudio == | ||
+ | [[tg_sendaudio|🔗 Отправить аудио]] | ||
+ | |||
+ | == tg_sendaudiofile == | ||
+ | [[tg_sendaudiofile|🔗 Отправить аудиофайл]] | ||
+ | |||
+ | == tg_sendchataction == | ||
+ | [[tg_sendchataction|🔗 Отправить фейковое сообщение]] | ||
+ | |||
+ | == tg_sendcontact == | ||
+ | [[tg_sendcontact|🔗 Отправить контакт]] | ||
+ | |||
+ | == tg_senddocument == | ||
+ | [[tg_senddocument|🔗 Отправить документ]] | ||
+ | |||
+ | == tg_sendgame == | ||
+ | [[tg_sendgame|🔗 Отправить игру]] | ||
+ | |||
+ | == tg_sendinvoice == | ||
+ | [[tg_sendinvoice|🔗 Отправить инвойс]] | ||
+ | |||
+ | == tg_sendlocation == | ||
+ | [[tg_sendlocation|🔗 Отправить локацию]] | ||
+ | |||
+ | == tg_sendmediagroup == | ||
+ | [[tg_sendmediagroup|🔗 Отправить медиагруппу]] | ||
+ | |||
+ | == tg_sendmessage == | ||
+ | [[tg_sendmessage|🔗 Отправить сообщение]] | ||
+ | |||
+ | == tg_sendphoto == | ||
+ | [[tg_sendphoto|🔗 Отправить фото]] | ||
+ | |||
+ | == tg_sendpoll == | ||
+ | [[tg_sendpoll|🔗 Отправить голосование]] | ||
+ | |||
+ | == tg_sendsticker == | ||
+ | [[tg_sendsticker|🔗 Отправить стикер]] | ||
+ | |||
+ | == tg_sendvenue == | ||
+ | [[tg_sendvenue|🔗 Отправить метку]] | ||
+ | |||
+ | == tg_sendvideo == | ||
+ | [[tg_sendvideo|🔗 Отправить видео]] | ||
+ | |||
+ | == tg_sendvideofile == | ||
+ | [[tg_sendvideofile|🔗 Отправить видеофайл]] | ||
+ | |||
+ | == tg_sendvoice == | ||
+ | [[tg_sendvoice|🔗 Отправить голос]] | ||
+ | |||
+ | == tg_setchatdescription == | ||
+ | [[tg_setchatdescription|🔗 Изменить описание чата]] | ||
+ | |||
+ | == tg_stopPoll == | ||
+ | [[tg_stopPoll|🔗 Остановить голосование]] | ||
+ | |||
+ | == tg_unbanchatmember == | ||
+ | [[tg_unbanchatmember|🔗 Разбанить пользователя]] | ||
+ | |||
+ | == tg_unpinchatmessage == | ||
+ | [[tg_unpinchatmessage|🔗 Снять пин с сообщения]] |
Текущая версия на 19:46, 26 июня 2019
🏠 Главная страница → 📖 Список функций → Работа с телеграм API
Содержание
- 1 tg_deleteMessage
- 2 tg_editmessagecaption
- 3 tg_editmessagemedia
- 4 tg_editmessagereplymarkup
- 5 tg_editmessagetext
- 6 tg_exportchatinvitelink
- 7 tg_forwardmessage
- 8 tg_getchat
- 9 tg_getchatadministrators
- 10 tg_getchatmember
- 11 tg_getchatmemberscount
- 12 tg_getMe
- 13 tg_kickchatmember
- 14 tg_leavechat
- 15 tg_pinchatmessage
- 16 tg_promotechatmember
- 17 tg_restrictchatmember
- 18 tg_sendanimation
- 19 tg_sendaudio
- 20 tg_sendaudiofile
- 21 tg_sendchataction
- 22 tg_sendcontact
- 23 tg_senddocument
- 24 tg_sendgame
- 25 tg_sendinvoice
- 26 tg_sendlocation
- 27 tg_sendmediagroup
- 28 tg_sendmessage
- 29 tg_sendphoto
- 30 tg_sendpoll
- 31 tg_sendsticker
- 32 tg_sendvenue
- 33 tg_sendvideo
- 34 tg_sendvideofile
- 35 tg_sendvoice
- 36 tg_setchatdescription
- 37 tg_stopPoll
- 38 tg_unbanchatmember
- 39 tg_unpinchatmessage
tg_deleteMessage
Use this method to delete a message, including service messages, with the following limitations: - A message can only be deleted if it was sent less than 48 hours ago. - Bots can delete outgoing messages in private chats, groups, and supergroups. - Bots can delete incoming messages in private chats. - Bots granted can_post_messages permissions can delete outgoing messages in channels. - If the bot is an administrator of a group, it can delete any message there. - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there. Returns True on success.
Use this method to edit captions of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
tg_editmessagemedia
Use this method to edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
tg_editmessagereplymarkup
🔗 Отредактировать только кнопки
Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
tg_editmessagetext
Use this method to edit text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
tg_exportchatinvitelink
tg_forwardmessage
tg_getchat
tg_getchatadministrators
🔗 Получить список администраторов
tg_getchatmember
tg_getchatmemberscount
🔗 Получить количество участников
tg_getMe
tg_kickchatmember
🔗 Выгнать пользователя из чата
tg_leavechat
tg_pinchatmessage
tg_promotechatmember
tg_restrictchatmember
tg_sendanimation
tg_sendaudio
tg_sendaudiofile
tg_sendchataction
🔗 Отправить фейковое сообщение