add a TUMBLR_NOW special hashtag for direct tumblr posting
This commit is contained in:
parent
ce28caa1db
commit
0e4ba13166
1 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,7 @@ import markovify
|
|||
import mutagen.id3
|
||||
import pytumblr
|
||||
import requests
|
||||
import telegram
|
||||
import youtube_dl
|
||||
from telegram import MessageEntity
|
||||
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
|
||||
|
@ -185,6 +186,11 @@ class DelojzaBot:
|
|||
message.reply_text('(btw, queueing to tumblr)')
|
||||
for filename in filenames:
|
||||
self.client.create_photo('kunsaxan', state="queue", data=filename)
|
||||
elif hashtag == 'TUMBLR_NOW' and self.client:
|
||||
message.reply_text('(btw, ***FIRING TO TUMBLR RIGHT AWAY***)',
|
||||
parse_mode=telegram.ParseMode.MARKDOWN)
|
||||
for filename in filenames:
|
||||
self.client.create_photo('kunsaxan', state="published", data=filename)
|
||||
return filenames
|
||||
except:
|
||||
_, exc_value, __ = sys.exc_info()
|
||||
|
|
Loading…
Reference in a new issue