def quote(self, ctx, qid, *, content=None):
if content is None:
msg = await self.bot.get_message(ctx.message.channel, qid)
if msg is None:
await self.bot.say("Message with that ID not found! (Or you used a user ID which you shouldn't use without content)")
else:
em = discord.Embed(description=msg.content, colour=msg.author.color)
em.set_author(name=str(msg.author), icon_url=msg.author.avatar_url)
em.set_footer(text="Sent | {}".format(msg.timestamp))
await self.bot.send_message(ctx.message.channel, embed=em)
else:
mem = ctx.message.server.get_member(qid)
if mem is None:
await self.bot.say("Member with that ID not found! (Or you used a message ID which you shouldn't use)")
else:
em = discord.Embed(description=content, colour=mem.color)
em.set_author(name=mem.display_name, icon_url=mem.avatar_url)
em.set_footer(text="Sent | {}".format(random.choice(["Sometime...", "in a whisper.", "in hell"])))
await self.bot.send_message(ctx.message.channel, embed=em)
评论列表
文章目录