def on_status(self, status):
## print(status.text)
if not status.in_reply_to_status_id and status.user.id_str in set([id for feeds in self.feeds.values() for id in feeds]):
# TODO: Settings for including replies, retweets, etc.
for channel_id, channel_feeds in self.feeds.items():
if status.user.id_str in channel_feeds:
embed = discord.Embed(title = '@' + status.user.screen_name, url = "https://twitter.com/{}/status/{}".format(status.user.screen_name, status.id), description = status.text, timestamp = status.created_at, color = clients.twitter_color)
embed.set_author(name = status.user.name, icon_url = status.user.profile_image_url)
embed.set_footer(text = "Twitter", icon_url = clients.twitter_icon_url)
channel = self.bot.get_channel(channel_id)
if channel:
self.bot.loop.create_task(self.bot.send_message(channel, embed = embed))
评论列表
文章目录