File tree Expand file tree Collapse file tree 6 files changed +63
-27
lines changed Expand file tree Collapse file tree 6 files changed +63
-27
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3+ # 0.16.7
4+
5+ - Update to Bot API 8.2
6+
37# 0.16.6
48
59- Fix poller rake task for Rails 8.0
Original file line number Diff line number Diff line change @@ -41,3 +41,24 @@ puts result_txt
4141API_METHODS_FILE = File . expand_path ( '../lib/telegram/bot/client/api_methods.txt' , __dir__ ) . freeze
4242File . write ( API_METHODS_FILE , result_txt )
4343puts '' , "Updated #{ API_METHODS_FILE } "
44+
45+
46+ puts '' , 'Payload types:'
47+ update_tbody = doc . css ( 'tbody' ) .
48+ find { |tbody | tbody . css ( 'td' ) . any? { |td | td . text == 'update_id' } }
49+ payload_types = update_tbody . css ( 'td:first-child' ) . map ( &:text ) . reject { |x | x == 'update_id' }
50+
51+ result = [ '# Generated with bin/fetch-telegram-methods' ]
52+ result << "# #{ api_version [ 1 ] } " if api_version
53+ result << payload_types . join ( "\n " )
54+ result << ''
55+ result_txt = result . join ( "\n " )
56+
57+ puts result_txt
58+
59+ PAYLOAD_TYPES_FILE = File . expand_path (
60+ '../lib/telegram/bot/updates_controller/payload_types.txt' ,
61+ __dir__ ,
62+ ) . freeze
63+ File . write ( PAYLOAD_TYPES_FILE , result_txt )
64+ puts '' , "Updated #{ PAYLOAD_TYPES_FILE } "
Original file line number Diff line number Diff line change 11# Generated with bin/fetch-telegram-methods
2- # Bot API 8.0
2+ # Bot API 8.2
33
44getUpdates
55setWebhook
@@ -121,6 +121,10 @@ setCustomEmojiStickerSetThumbnail
121121deleteStickerSet
122122getAvailableGifts
123123sendGift
124+ verifyUser
125+ verifyChat
126+ removeUserVerification
127+ removeChatVerification
124128
125129answerInlineQuery
126130answerWebAppQuery
Original file line number Diff line number Diff line change @@ -89,31 +89,13 @@ class UpdatesController < AbstractController::Base # rubocop:disable Metrics/Cla
8989
9090 extend Session ::ConfigMethods
9191
92- PAYLOAD_TYPES = Set . new ( %w[
93- message
94- edited_message
95- channel_post
96- edited_channel_post
97- business_connection
98- business_message
99- edited_business_message
100- deleted_business_messages
101- message_reaction
102- message_reaction_count
103- inline_query
104- chosen_inline_result
105- callback_query
106- shipping_query
107- pre_checkout_query
108- purchased_paid_media
109- poll
110- poll_answer
111- my_chat_member
112- chat_member
113- chat_join_request
114- chat_boost
115- removed_chat_boost
116- ] . freeze )
92+ PAYLOAD_TYPES_FILE = File . expand_path ( 'updates_controller/payload_types.txt' , __dir__ )
93+ PAYLOAD_TYPES = File . read ( PAYLOAD_TYPES_FILE ) .
94+ lines .
95+ map ( &:strip ) .
96+ reject { |x | x . empty? || x . start_with? ( '#' ) } .
97+ to_set .
98+ freeze
11799
118100 class << self
119101 # Initialize controller and process update.
Original file line number Diff line number Diff line change 1+ # Generated with bin/fetch-telegram-methods
2+ # Bot API 8.2
3+ message
4+ edited_message
5+ channel_post
6+ edited_channel_post
7+ business_connection
8+ business_message
9+ edited_business_message
10+ deleted_business_messages
11+ message_reaction
12+ message_reaction_count
13+ inline_query
14+ chosen_inline_result
15+ callback_query
16+ shipping_query
17+ pre_checkout_query
18+ purchased_paid_media
19+ poll
20+ poll_answer
21+ my_chat_member
22+ chat_member
23+ chat_join_request
24+ chat_boost
25+ removed_chat_boost
Original file line number Diff line number Diff line change 22
33module Telegram
44 module Bot
5- VERSION = '0.16.6 '
5+ VERSION = '0.16.7 '
66
77 def self . gem_version
88 Gem ::Version . new VERSION
You can’t perform that action at this time.
0 commit comments