telerb 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3db2e928c39d62a55c8d9a16bf1b1d6efe3f3022acb0e516ae8f62cc317aa68
4
- data.tar.gz: 27f16654ae9420a8369d2beec14199c225139eac7dd8adccb46387e4cd1bb4f1
3
+ metadata.gz: 78d7ec07b519c1f75aec94eb4ac66e0f34d86ff7c1485436dbc1caae1aaadf5c
4
+ data.tar.gz: 3bf93431b90dc93e26ec310a8f18c5cf108da873e0f58ef8c6a6b5a264435c42
5
5
  SHA512:
6
- metadata.gz: be06d05d8992bc2fbd85b6589db0b7728d88dfd2e4d177f54d2224b18f2782dd038522083868fb0855bb0b36ee9387fcb69cdfcdefc448e3ad958fe3fbae7c53
7
- data.tar.gz: fbd917d08644cdaab74b525f1d96004cb901247d491bda396017805cfdaa522d8712b26a76e163b1d055e43bcfcf395a9046d7cc6b81fc817a5a6b410f78fa16
6
+ metadata.gz: de664f52593818ef039e2a8c30b039b59572c681ee02072428630571fa70f90523324d8c886fbbd4962ac060cbf78e899e9b33063b7cdad2a8457a64bfdda2e7
7
+ data.tar.gz: 54071830dc6d80c45ca94ae37a86a9662420ffdcdc48a8a9abded3150524b4b43e22fbf13bcc99c42e2a4c6bfa3e77dfef4f1a5c33a3edefd0e57cbd6368f25a
data/2 ADDED
File without changes
data/CHANGELOG.md CHANGED
@@ -18,4 +18,8 @@
18
18
 
19
19
  ## [0.1.3] - 2024-04-08
20
20
 
21
- - Implement the methods to define the commands and obtain the defined commands
21
+ - Implement the methods to define the commands and obtain the defined commands
22
+
23
+ ## [0.1.4] - 2024-04-09
24
+
25
+ - Implements the forwardMessage method
data/README.md CHANGED
@@ -64,6 +64,15 @@ bot.get_commands
64
64
 
65
65
  ```
66
66
 
67
+ ### Forward Message
68
+
69
+ ```
70
+
71
+ # Method for forwarding a message from one chat to another
72
+ bot.forward_message(from_chat_id, to_chat_id, message_id)
73
+
74
+ ```
75
+
67
76
  ## Development
68
77
 
69
78
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TeleRb
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/telerb.rb CHANGED
@@ -72,6 +72,15 @@ module TeleRb
72
72
  nil
73
73
  end
74
74
 
75
+ def forward_message(from_chat_id, to_chat_id, message_id)
76
+ CLIENT.post("#{@base_uri}#{@token}/forwardMessage",
77
+ { chat_id: to_chat_id, from_chat_id: from_chat_id, message_id: message_id })
78
+ "Forwarding was then done successfully!"
79
+ rescue StandardError => e
80
+ puts "Error forwarding message: #{e.message}"
81
+ nil
82
+ end
83
+
75
84
  private
76
85
 
77
86
  def send_media(chat_id, media_path, caption = nil, reply_to_message_id = nil, method, filekey)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telerb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodeByAllan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby library to interact with the Telegram API and create custom bots.
14
14
  email:
@@ -20,6 +20,7 @@ files:
20
20
  - ".rspec"
21
21
  - ".rubocop.yml"
22
22
  - ".ruby-version"
23
+ - '2'
23
24
  - CHANGELOG.md
24
25
  - CODE_OF_CONDUCT.md
25
26
  - LICENSE.txt