rubydium 0.3.7 → 0.3.9

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: b4a39256284aa19750a1171ca95cc4d7973fc853a776f4bcc649fab7bde4d22c
4
- data.tar.gz: fa38698c36816a8b1015c303c1c37d08b7d40b0a304df78840007aeae8505ffa
3
+ metadata.gz: 6c1d20d65d61bd05e2ae6df13ad97e86cb9bad0f3c59a7f00158f446647c54bc
4
+ data.tar.gz: 9a648c95b7fd214a14e664c276ccf253df28ecd165aedde1eefc6a6ea55c0836
5
5
  SHA512:
6
- metadata.gz: 3ff895ae15e3e9d05f1fda6609cd319ea8527f1928dd1fbd8b43615fb446ce9c812686bd9747a205ab7431a2f120d384bff89085d6b918fd27ee444e9fcbf4e4
7
- data.tar.gz: cf7484996d2ae6c167750b70d40585085ddb97ba2c163e8dc619d4c5fcbeaa007ed15803b0c8d94143b5e31b4d84a0e58cf8b2f4c6431eb59092be1443ca69da
6
+ metadata.gz: dc3bd24a3265d25cb6a3452c401b189ad11e51891b6815dbde2d9ab4159a3a82b9b68cb6165fea290922223c2a664137f5bfe27c1ad4bc8ca18f60472cb6e4d0
7
+ data.tar.gz: 39b50ca278eb0f712f4ba2c4b03b86fdf7b22cb0681bc1d74c5290018793a28949322478c3dd61168b5bdf89595825e6f42f2ddd917045948436683d357ec1b9
@@ -87,11 +87,11 @@ module Rubydium
87
87
  )
88
88
  end
89
89
 
90
- def reply(text, **args)
90
+ def reply(text, **kwargs)
91
91
  send_message(
92
92
  text,
93
93
  reply_to_message_id: @message_id,
94
- **args
94
+ **kwargs
95
95
  )
96
96
  end
97
97
 
@@ -99,10 +99,11 @@ module Rubydium
99
99
  reply("```\n#{text}```", parse_mode: "Markdown")
100
100
  end
101
101
 
102
- def reply_to_target(text)
102
+ def reply_to_target(text, **kwargs)
103
103
  send_message(
104
+ text,
104
105
  reply_to_message_id: @replies_to.message_id,
105
- text: text
106
+ **kwargs
106
107
  )
107
108
  end
108
109
  end
@@ -3,7 +3,9 @@ module Rubydium
3
3
  module OtherActions
4
4
  def safe_delete(maybe_message)
5
5
  message = definitely_message(maybe_message)
6
- return false unless message&.from&.id == config.bot_id # also returns if it's nil
6
+ from_bot = message&.from&.id == config.bot_id # also returns if it's nil
7
+ from_owner = message&.from&.username == config.owner_username
8
+ return false unless from_bot || from_owner
7
9
 
8
10
  safe_delete_by_id(message.message_id)
9
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubydium
4
- VERSION = "0.3.7"
4
+ VERSION = "0.3.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-24 00:00:00.000000000 Z
11
+ date: 2023-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: telegram-bot-ruby