【发布时间】:2021-04-09 15:10:51
【问题描述】:
所以最近我试图在我的不和谐机器人中创建服务器角色命令,这将显示服务器中存在的所有角色。我想将它们设置在单列而不是行中。我无法这样做。我可以进行哪些更改以在单个列中显示它[对不起,如果我无法让你正确理解,因为我的英语有点差。] 任何帮助表示赞赏!
我希望它是怎样的:
它是怎样的:
我当前的代码:
@commands.command(pass_context=True)
async def roles(self, ctx):
guild = ctx.guild
roles = [role for role in guild.roles if role != ctx.guild.default_role]
embed = discord.Embed(title="Server Roles", description=f" ".join([role.mention for role in roles]))
await ctx.send(embed=embed)
【问题讨论】:
标签: python python-3.x discord discord.py discord.py-rewrite