botomizer 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/botomizer/client.rb +10 -0
- data/lib/botomizer/telegram.rb +4 -0
- data/lib/botomizer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f316f2b2731f7ae5de679a44741fcef47c18198b
|
4
|
+
data.tar.gz: 86048d21e5f29b21fa3b8e103656317d43ab6fbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1327aed0030e918f435a6956be811726a9d1691d74a3a4259a3929db68d0e48245dba0eec3d8c601a7e19af8f52698627d630531fc90d0f457f27907f301a3b3
|
7
|
+
data.tar.gz: d990f70fedc3f67a851c0563dd2b7e1199a4cac57151581e214d6cdae0c23e0255bafcd730f9083230e2153dab88b4ee34e783ad7eb9f93ff7160b13916e3c05
|
data/lib/botomizer/client.rb
CHANGED
@@ -78,4 +78,14 @@ class Botomizer::Client
|
|
78
78
|
raise Botomizer::ResponseError.new(result[:message]) if result[:status] == :failed
|
79
79
|
result
|
80
80
|
end
|
81
|
+
|
82
|
+
def delete_message
|
83
|
+
bot.delete_message
|
84
|
+
end
|
85
|
+
|
86
|
+
def delete_message!
|
87
|
+
result = delete_message
|
88
|
+
raise Botomizer::ResponseError.new(result[:message]) if result[:status] == :failed
|
89
|
+
result
|
90
|
+
end
|
81
91
|
end
|
data/lib/botomizer/telegram.rb
CHANGED
@@ -53,6 +53,10 @@ module Botomizer::Telegram
|
|
53
53
|
def send_message(text, options = {})
|
54
54
|
send(:sendMessage, {chat_id: @chat.id, text: text, parse_mode: 'HTML'}.merge(options))
|
55
55
|
end
|
56
|
+
|
57
|
+
def delete_message
|
58
|
+
send(:deleteMessage, {chat_id: @chat.id, message_id: @message.id})
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
|
data/lib/botomizer/version.rb
CHANGED