зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-03 17:55:52 +03:00
Сравнить коммиты
1 Коммитов
| Автор | SHA1 | Дата | |
|---|---|---|---|
|
|
cb973d90dc |
@@ -1,5 +1,9 @@
|
|||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
# 0.16.7
|
||||||
|
|
||||||
|
- Update to Bot API 8.2
|
||||||
|
|
||||||
# 0.16.6
|
# 0.16.6
|
||||||
|
|
||||||
- Fix poller rake task for Rails 8.0
|
- 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
|
API_METHODS_FILE = File.expand_path('../lib/telegram/bot/client/api_methods.txt', __dir__).freeze
|
||||||
File.write(API_METHODS_FILE, result_txt)
|
File.write(API_METHODS_FILE, result_txt)
|
||||||
puts '', "Updated #{API_METHODS_FILE}"
|
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
|
# Generated with bin/fetch-telegram-methods
|
||||||
# Bot API 8.0
|
# Bot API 8.2
|
||||||
|
|
||||||
getUpdates
|
getUpdates
|
||||||
setWebhook
|
setWebhook
|
||||||
@@ -121,6 +121,10 @@ setCustomEmojiStickerSetThumbnail
|
|||||||
deleteStickerSet
|
deleteStickerSet
|
||||||
getAvailableGifts
|
getAvailableGifts
|
||||||
sendGift
|
sendGift
|
||||||
|
verifyUser
|
||||||
|
verifyChat
|
||||||
|
removeUserVerification
|
||||||
|
removeChatVerification
|
||||||
|
|
||||||
answerInlineQuery
|
answerInlineQuery
|
||||||
answerWebAppQuery
|
answerWebAppQuery
|
||||||
|
|||||||
@@ -89,31 +89,13 @@ module Telegram
|
|||||||
|
|
||||||
extend Session::ConfigMethods
|
extend Session::ConfigMethods
|
||||||
|
|
||||||
PAYLOAD_TYPES = Set.new(%w[
|
PAYLOAD_TYPES_FILE = File.expand_path('updates_controller/payload_types.txt', __dir__)
|
||||||
message
|
PAYLOAD_TYPES = File.read(PAYLOAD_TYPES_FILE).
|
||||||
edited_message
|
lines.
|
||||||
channel_post
|
map(&:strip).
|
||||||
edited_channel_post
|
reject { |x| x.empty? || x.start_with?('#') }.
|
||||||
business_connection
|
to_set.
|
||||||
business_message
|
freeze
|
||||||
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)
|
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
# Initialize controller and process update.
|
# 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 Telegram
|
||||||
module Bot
|
module Bot
|
||||||
VERSION = '0.16.6'
|
VERSION = '0.16.7'
|
||||||
|
|
||||||
def self.gem_version
|
def self.gem_version
|
||||||
Gem::Version.new VERSION
|
Gem::Version.new VERSION
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user