🌙

Справочник методов

Справочник методов

Полный список того, что умеет бот. Все методы вызываются как https://api.kodari.ru/msg/bot.php?method=<Имя>.

Сообщения

МетодHTTPpykodaribotРаздел
sendMessagePOSTbot.send_message()Сообщения
sendPhotoPOSTbot.send_photo()Сообщения
sendVideoPOSTbot.send_video()Сообщения
sendAudioPOSTbot.send_audio()Сообщения
sendDocumentPOSTbot.send_document()Сообщения
editMessageTextPOSTbot.edit_message_text()Сообщения
deleteMessagePOSTbot.delete_message()Сообщения

Обновления

МетодHTTPpykodaribotРаздел
getUpdatesGETbot.get_updates()Обновления и кнопки
answerCallbackQueryPOSTbot.answer_callback_query()Обновления и кнопки

Профиль бота

МетодHTTPpykodaribotРаздел
getMeGETbot.get_me()Профиль и команды
setMyCommandsPOSTbot.set_my_commands()Профиль и команды
getMyCommandsGETbot.get_my_commands()Профиль и команды
setMyNamePOSTbot.set_my_name()Профиль и команды
setMyDescriptionPOSTbot.set_my_description()Профиль и команды
setMyShortDescriptionPOSTbot.set_my_short_description()Профиль и команды

Чаты и участники

МетодHTTPpykodaribotРаздел
getChatGETbot.get_chat()Чаты и участники
getChatMemberGETbot.get_chat_member()Чаты и участники
getChatMemberCountGETbot.get_chat_member_count()Чаты и участники
getChatAdministratorsGETbot.get_chat_administrators()Чаты и участники
resolveUserGETbot.resolve_user()Чаты и участники
getOrCreateChatPOSTbot.get_or_create_chat()Чаты и участники

Администрирование чата

МетодHTTPpykodaribotТребуемое право
setChatTitlePOSTbot.set_chat_title()change_info
setChatDescriptionPOSTbot.set_chat_description()change_info
setChatPhotoPOSTbot.set_chat_photo()change_info
deleteChatPhotoPOSTbot.delete_chat_photo()change_info
setChatPermissionsPOSTbot.set_chat_permissions()change_info
setChatSlowModePOSTbot.set_chat_slow_mode()change_info
pinMessagePOSTbot.pin_message()pin_messages
unpinMessagePOSTbot.unpin_message()pin_messages
banChatMemberPOSTbot.ban_chat_member()block_users
unbanChatMemberPOSTbot.unban_chat_member()block_users
kickChatMemberPOSTbot.kick_chat_member()remove_users
promoteChatMemberPOSTbot.promote_chat_member()add_admins
demoteChatMemberPOSTbot.demote_chat_member()add_admins
setChatAdministratorCustomTitlePOSTbot.set_chat_administrator_custom_title()add_admins
exportChatInviteLinkGETbot.export_chat_invite_link()invite_users
createChatInviteLinkPOSTbot.create_chat_invite_link()invite_users
revokeChatInviteLinkPOSTbot.revoke_chat_invite_link()invite_users
getChatAdminLogGETbot.get_chat_admin_log()роль admin/owner

Всего 39 методов. Любое другое имя метода вернёт 404 Unknown method.

Чего в API нет

ОтсутствуетЧто использовать вместо
Webhooks (setWebhook, deleteWebhook, getWebhookInfo)long polling через getUpdates
forwardMessageотправить новое сообщение с текстом оригинала
setMessageReaction
getPinnedMessagesgetChat возвращает поле pinned_message
editMessageCaption, editMessageMediaудалить и отправить заново
Reply-клавиатуры (обычные кнопки)inline-клавиатура в reply_markup
19 просмотров