add /queue command
This commit is contained in:
parent
e51f42a32e
commit
ef454338ae
1 changed files with 8 additions and 0 deletions
|
@ -111,6 +111,7 @@ class DelojzaBot:
|
|||
dp.add_handler(CommandHandler("delete", self.tg_delete))
|
||||
dp.add_handler(CommandHandler("protect", self.tg_protect))
|
||||
dp.add_handler(CommandHandler("version", self.tg_version))
|
||||
dp.add_handler(CommandHandler("queue", self.tg_queue))
|
||||
dp.add_handler(MessageHandler(None, self.tg_handle))
|
||||
|
||||
self.acoustid_key = acoustid_key
|
||||
|
@ -703,6 +704,13 @@ class DelojzaBot:
|
|||
else:
|
||||
update.message.reply_text((self.markov.make_sentence() if self.markov and random() > .7 else "") + "???")
|
||||
|
||||
def tg_queue(self, _, update):
|
||||
if self.tumblr_client:
|
||||
blog_info = self.tumblr_client.blog_info(self.tumblr_name)
|
||||
update.message.reply_text("Currently queued tumblr posts: " + str(blog_info['blog'].get('queue', "???")))
|
||||
else:
|
||||
update.message.reply_text((self.markov.make_sentence() if self.markov and random() > .7 else "") + "???")
|
||||
|
||||
# noinspection PyMethodMayBeStatic
|
||||
def tg_version(self, _, update):
|
||||
self._log_msg(update)
|
||||
|
|
Loading…
Reference in a new issue