Rubka 1.8.6__tar.gz → 2.11.9__tar.gz
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.
- {rubka-1.8.6 → rubka-2.11.9}/PKG-INFO +1 -1
- {rubka-1.8.6 → rubka-2.11.9}/Rubka.egg-info/PKG-INFO +1 -1
- {rubka-1.8.6 → rubka-2.11.9}/rubka/api.py +6 -2
- {rubka-1.8.6 → rubka-2.11.9}/setup.py +1 -1
- {rubka-1.8.6 → rubka-2.11.9}/README.md +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/Rubka.egg-info/SOURCES.txt +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/Rubka.egg-info/dependency_links.txt +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/Rubka.egg-info/requires.txt +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/Rubka.egg-info/top_level.txt +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/__init__.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/config.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/context.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/decorators.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/exceptions.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/jobs.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/keyboards.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/keypad.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/logger.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/rubka/utils.py +0 -0
- {rubka-1.8.6 → rubka-2.11.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.11.9
|
|
4
4
|
Summary: A Python library for interacting with Rubika Bot API.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/Rubka/archive/refs/tags/v0.1.0.tar.gz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.11.9
|
|
4
4
|
Summary: A Python library for interacting with Rubika Bot API.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/Rubka/archive/refs/tags/v0.1.0.tar.gz
|
|
@@ -125,11 +125,13 @@ class Robot:
|
|
|
125
125
|
message_id = msg.get('message_id')
|
|
126
126
|
sender_id = msg.get('sender_id')
|
|
127
127
|
text = msg.get('text')
|
|
128
|
-
|
|
128
|
+
try:
|
|
129
|
+
import time
|
|
130
|
+
if msg.get("time") and (time.time() - float(msg["time"])) > 10:return
|
|
131
|
+
except Exception as e:return
|
|
129
132
|
if self._message_handler:
|
|
130
133
|
handler = self._message_handler
|
|
131
134
|
context = Message(bot=self, chat_id=chat_id, message_id=message_id, sender_id=sender_id, text=text, raw_data=msg)
|
|
132
|
-
|
|
133
135
|
if handler["commands"]:
|
|
134
136
|
if not context.text or not context.text.startswith("/"):
|
|
135
137
|
return
|
|
@@ -144,6 +146,7 @@ class Robot:
|
|
|
144
146
|
return
|
|
145
147
|
|
|
146
148
|
handler["func"](self, context)
|
|
149
|
+
|
|
147
150
|
elif update.get('type') == 'ReceiveQuery':
|
|
148
151
|
msg = update.get("inline_message", {})
|
|
149
152
|
chat_id = msg.get("chat_id")
|
|
@@ -155,6 +158,7 @@ class Robot:
|
|
|
155
158
|
context = Message(bot=self, chat_id=chat_id, message_id=message_id, sender_id=sender_id, text=text, raw_data=msg)
|
|
156
159
|
self._callback_handler(self, context)
|
|
157
160
|
|
|
161
|
+
|
|
158
162
|
def run(self):
|
|
159
163
|
print("Bot started running...")
|
|
160
164
|
if self._offset_id is None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|