twittercog.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:brochat-bot 作者: nluedtke 项目源码 文件源码
def get_trump(self, ctx):
        """Get Trump's latest Yuge success!"""

        if common.twitter is None:
            await ctx.send("Twitter not activated.")
            return

        twitter_id = 'realdonaldtrump'
        tweet_text = \
            ':pen_ballpoint::monkey: Trump has been saying things, as ' \
            'usual...'
        rt_text = \
            ':pen_ballpoint::monkey: Trump has been repeating things, as ' \
            'usual... (RT ALERT)'

        try:
            await get_last_tweet(twitter_id, tweet_text, rt_text, ctx)
        except TwythonError:
            await self.bot.say("Twitter is acting up, try again later.")

        if common.trump_chance_roll_rdy:
            await item_chance_roll(ctx.bot, ctx.message.author.display_name,
                                   ctx.message.channel)
            common.trump_chance_roll_rdy = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号