Skip to content

Commit e9afb1a

Browse files
author
p-hash
committed
Fix not working reply (main feature) and add main menu button to new message
1 parent 16d3478 commit e9afb1a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

db.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ def startmsg(self):
137137

138138
@property
139139
def replying_to(self):
140-
if time() - self._last_seen > self._replying_to_expiration: # if admin wasn't here for a quite long time
140+
if time() - self._replying_to_update > self._replying_to_expiration: # if admin wasn't here for a quite long time
141141
self._replying_to = None # ignore last replying_to
142142
return self._replying_to
143143

144144
@replying_to.setter
145145
def replying_to(self, value):
146146
self._replying_to = value
147+
self._replying_to_update = time()
147148

148149
def update_last_seen(self):
149150
self._last_seen = time()

proxy_bot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ def handle_all(message):
479479
types.InlineKeyboardButton(strings.btn.block, callback_data='user_block_{}'.format(user.id)),
480480
types.InlineKeyboardButton(strings.btn.reply, callback_data='reply_{}'.format(user.id))
481481
)
482+
markup.add(types.InlineKeyboardButton(strings.btn.menu, callback_data='menu'))
482483
bot.send_message( # send it to admin
483484
my_id,
484485
text,

0 commit comments

Comments
 (0)