def starrers(self, ctx, message_id: int):
"""Get the list of starrers from a message in the current channel."""
try:
message = await ctx.channel.get_message(message_id)
except discord.NotFound:
return await ctx.send('Message not found')
except discord.Forbidden:
return await ctx.send("Can't retrieve message")
except discord.HTTPException as err:
return await ctx.send(f'Failed to retrieve message: {err!r}')
guild = ctx.guild
await self._get_starconfig(guild.id)
star = await self.get_star(guild.id, message.id)
if star is None:
return await ctx.send('Star object not found')
_, em = make_star_embed(star, message)
starrers = [guild.get_member(starrer_id)
for starrer_id in star['starrers']]
em.add_field(name='Starrers', value=', '.join([m.display_name
for m in starrers]))
await ctx.send(embed=em)
评论列表
文章目录