telegram-bot-ruby 0.19.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 563fac17367e992644af0d59f41fe66efe6bcfa772d34dea3a503d03e8033192
4
- data.tar.gz: 7e53b20ee986523a1247182b884a83e602033e8ffe0a7fcae394385b894b42e9
3
+ metadata.gz: 4bd27ca4fa5ebce0538a52e94ba8a2d88fab6d4f9c0e187415c73e37d4ce31ec
4
+ data.tar.gz: fdcc6590cf65714f00a94573c4b7eb72582fa2929c3bd202fe42464b654f9078
5
5
  SHA512:
6
- metadata.gz: a740b0e7c0941802e5bcaa9fb75fa5bd60a7fb179cd192a7a48ef8842630320178cda689d6eb6abfa2c34e31a37d8a2151f97d2f0a0435c430fc02e371ede62d
7
- data.tar.gz: f6de10265d9eecf338a77912845973093c2dc87fbdc39df4cc73f8e33a22eba75aa41aec4080b6f2a1ed3c80cb80ec78932c0917ae2fdcd3220174e2e1bdec1f
6
+ metadata.gz: b3d3d11c744b6b3773c0a1fdfa9c3e8d18b4ad286e020a135551c2182f136757aea74a52f3e9c427e98c0411822ccbd24b731e2625d5374fbd4dc8ce667215e3
7
+ data.tar.gz: f328f17dfe2b4cdf352c3026e9cbd3aa11b2c21854ddb03b45a431497964ba57d12e2af9b414819ed008fb03548ee94b671a0f9134a24d335f3d53f977ceb758
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0
4
+
5
+ - Implement [Bot API 6.1](https://core.telegram.org/bots/api#june-20-2022)
6
+ - Implement [Bot API 6.2](https://core.telegram.org/bots/api#august-12-2022)
7
+
8
+ ## 0.20.0
9
+
10
+ - Update `faraday` up to `2.0`
11
+
3
12
  ## 0.19.0
4
13
 
5
14
  - Implement [Bot API 6.0](https://core.telegram.org/bots/api-changelog#april-16-2022)
@@ -26,7 +26,7 @@ module Telegram
26
26
  approveChatJoinRequest declineChatJoinRequest banChatSenderChat
27
27
  unbanChatSenderChat answerWebAppQuery setChatMenuButton
28
28
  getChatMenuButton setMyDefaultAdministratorRights
29
- getMyDefaultAdministratorRights
29
+ getMyDefaultAdministratorRights createInvoiceLink
30
30
  ].freeze
31
31
 
32
32
  attr_reader :token, :url
@@ -60,7 +60,7 @@ module Telegram
60
60
  def log_incoming_message(message)
61
61
  uid = message.respond_to?(:from) && message.from ? message.from.id : nil
62
62
  logger.info(
63
- format('Incoming message: text="%<text>s" uid=%<uid>s', message: message, uid: uid)
63
+ format('Incoming message: text="%<message>s" uid=%<uid>s', message: message, uid: uid)
64
64
  )
65
65
  end
66
66
  end
@@ -17,6 +17,9 @@ module Telegram
17
17
  attribute :photo, ChatPhoto
18
18
  attribute :bio, String
19
19
  attribute :has_private_forwards, Boolean
20
+ attribute :has_restricted_voice_and_video_messages, Boolean
21
+ attribute :join_to_send_messages, Boolean
22
+ attribute :join_by_request, Boolean
20
23
  attribute :description, String
21
24
  attribute :invite_link, String
22
25
  attribute :pinned_message, 'Telegram::Bot::Types::Message'
@@ -26,7 +29,6 @@ module Telegram
26
29
  attribute :has_protected_content, Boolean
27
30
  attribute :sticker_set_name, String
28
31
  attribute :can_set_sticker_set, Boolean
29
- attribute :all_members_are_administrators, Boolean
30
32
  attribute :linked_chat_id, Integer
31
33
  attribute :location, ChatLocation
32
34
  end
@@ -10,6 +10,7 @@ module Telegram
10
10
  attribute :url, String
11
11
  attribute :user, User
12
12
  attribute :language, String
13
+ attribute :custom_emoji_id, String
13
14
  end
14
15
  end
15
16
  end
@@ -6,6 +6,7 @@ module Telegram
6
6
  class Sticker < Base
7
7
  attribute :file_id, String
8
8
  attribute :file_unique_id, String
9
+ attribute :type, String
9
10
  attribute :width, Integer
10
11
  attribute :height, Integer
11
12
  attribute :is_animated, Boolean
@@ -13,7 +14,9 @@ module Telegram
13
14
  attribute :thumb, PhotoSize
14
15
  attribute :emoji, String
15
16
  attribute :set_name, String
17
+ attribute :premium_animation, File
16
18
  attribute :mask_position, MaskPosition
19
+ attribute :custom_emoji_id, String
17
20
  attribute :file_size, Integer
18
21
  end
19
22
  end
@@ -6,6 +6,7 @@ module Telegram
6
6
  class StickerSet < Base
7
7
  attribute :name, String
8
8
  attribute :title, String
9
+ attribute :sticker_type, String
9
10
  attribute :is_animated, Boolean
10
11
  attribute :is_video, Boolean
11
12
  attribute :contains_masks, Boolean
@@ -10,6 +10,8 @@ module Telegram
10
10
  attribute :last_name, String
11
11
  attribute :username, String
12
12
  attribute :language_code, String
13
+ attribute :is_premium, Boolean
14
+ attribute :added_to_attachment_menu, Boolean
13
15
  attribute :can_join_groups, Boolean
14
16
  attribute :can_read_all_group_messages, Boolean
15
17
  attribute :supports_inline_queries, Boolean
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Telegram
4
4
  module Bot
5
- VERSION = '0.19.1'
5
+ VERSION = '0.21.0'
6
6
  end
7
7
  end
data/lib/telegram/bot.rb CHANGED
@@ -4,6 +4,7 @@ require 'virtus'
4
4
  require 'logger'
5
5
  require 'json'
6
6
  require 'faraday'
7
+ require 'faraday/multipart'
7
8
 
8
9
  require 'telegram/bot/types'
9
10
  require 'telegram/bot/exceptions'
@@ -20,7 +20,8 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'dry-inflector'
23
- spec.add_dependency 'faraday', '~> 1.0'
23
+ spec.add_dependency 'faraday', '~> 2.0'
24
+ spec.add_dependency 'faraday-multipart', '~> 1.0'
24
25
  spec.add_dependency 'virtus', '~> 2.0'
25
26
 
26
27
  spec.add_development_dependency 'pry'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-bot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Tipugin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector
@@ -26,6 +26,20 @@ dependencies:
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday-multipart
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
@@ -306,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
320
  - !ruby/object:Gem::Version
307
321
  version: '0'
308
322
  requirements: []
309
- rubygems_version: 3.3.3
323
+ rubygems_version: 3.3.7
310
324
  signing_key:
311
325
  specification_version: 4
312
326
  summary: Ruby wrapper for Telegram's Bot API