зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-08-28 15:26:18 +03:00
Сравнить коммиты
1 Коммитов
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
cb973d90dc |
@@ -1,5 +1,9 @@
|
||||
# Unreleased
|
||||
|
||||
# 0.16.7
|
||||
|
||||
- Update to Bot API 8.2
|
||||
|
||||
# 0.16.6
|
||||
|
||||
- Fix poller rake task for Rails 8.0
|
||||
|
||||
@@ -41,3 +41,24 @@ puts result_txt
|
||||
API_METHODS_FILE = File.expand_path('../lib/telegram/bot/client/api_methods.txt', __dir__).freeze
|
||||
File.write(API_METHODS_FILE, result_txt)
|
||||
puts '', "Updated #{API_METHODS_FILE}"
|
||||
|
||||
|
||||
puts '', 'Payload types:'
|
||||
update_tbody = doc.css('tbody').
|
||||
find { |tbody| tbody.css('td').any? { |td| td.text == 'update_id' } }
|
||||
payload_types = update_tbody.css('td:first-child').map(&:text).reject { |x| x == 'update_id' }
|
||||
|
||||
result = ['# Generated with bin/fetch-telegram-methods']
|
||||
result << "# #{api_version[1]}" if api_version
|
||||
result << payload_types.join("\n")
|
||||
result << ''
|
||||
result_txt = result.join("\n")
|
||||
|
||||
puts result_txt
|
||||
|
||||
PAYLOAD_TYPES_FILE = File.expand_path(
|
||||
'../lib/telegram/bot/updates_controller/payload_types.txt',
|
||||
__dir__,
|
||||
).freeze
|
||||
File.write(PAYLOAD_TYPES_FILE, result_txt)
|
||||
puts '', "Updated #{PAYLOAD_TYPES_FILE}"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Generated with bin/fetch-telegram-methods
|
||||
# Bot API 8.0
|
||||
# Bot API 8.2
|
||||
|
||||
getUpdates
|
||||
setWebhook
|
||||
@@ -121,6 +121,10 @@ setCustomEmojiStickerSetThumbnail
|
||||
deleteStickerSet
|
||||
getAvailableGifts
|
||||
sendGift
|
||||
verifyUser
|
||||
verifyChat
|
||||
removeUserVerification
|
||||
removeChatVerification
|
||||
|
||||
answerInlineQuery
|
||||
answerWebAppQuery
|
||||
|
||||
@@ -89,31 +89,13 @@ module Telegram
|
||||
|
||||
extend Session::ConfigMethods
|
||||
|
||||
PAYLOAD_TYPES = Set.new(%w[
|
||||
message
|
||||
edited_message
|
||||
channel_post
|
||||
edited_channel_post
|
||||
business_connection
|
||||
business_message
|
||||
edited_business_message
|
||||
deleted_business_messages
|
||||
message_reaction
|
||||
message_reaction_count
|
||||
inline_query
|
||||
chosen_inline_result
|
||||
callback_query
|
||||
shipping_query
|
||||
pre_checkout_query
|
||||
purchased_paid_media
|
||||
poll
|
||||
poll_answer
|
||||
my_chat_member
|
||||
chat_member
|
||||
chat_join_request
|
||||
chat_boost
|
||||
removed_chat_boost
|
||||
].freeze)
|
||||
PAYLOAD_TYPES_FILE = File.expand_path('updates_controller/payload_types.txt', __dir__)
|
||||
PAYLOAD_TYPES = File.read(PAYLOAD_TYPES_FILE).
|
||||
lines.
|
||||
map(&:strip).
|
||||
reject { |x| x.empty? || x.start_with?('#') }.
|
||||
to_set.
|
||||
freeze
|
||||
|
||||
class << self
|
||||
# Initialize controller and process update.
|
||||
|
||||
25
lib/telegram/bot/updates_controller/payload_types.txt
Обычный файл
25
lib/telegram/bot/updates_controller/payload_types.txt
Обычный файл
@@ -0,0 +1,25 @@
|
||||
# Generated with bin/fetch-telegram-methods
|
||||
# Bot API 8.2
|
||||
message
|
||||
edited_message
|
||||
channel_post
|
||||
edited_channel_post
|
||||
business_connection
|
||||
business_message
|
||||
edited_business_message
|
||||
deleted_business_messages
|
||||
message_reaction
|
||||
message_reaction_count
|
||||
inline_query
|
||||
chosen_inline_result
|
||||
callback_query
|
||||
shipping_query
|
||||
pre_checkout_query
|
||||
purchased_paid_media
|
||||
poll
|
||||
poll_answer
|
||||
my_chat_member
|
||||
chat_member
|
||||
chat_join_request
|
||||
chat_boost
|
||||
removed_chat_boost
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
module Telegram
|
||||
module Bot
|
||||
VERSION = '0.16.6'
|
||||
VERSION = '0.16.7'
|
||||
|
||||
def self.gem_version
|
||||
Gem::Version.new VERSION
|
||||
|
||||
Ссылка в новой задаче
Block a user