我需要提到一个id为631147065925173310
的特定角色。我什么都试过了,很多人对我说我不懂python,这很难,但我只学了2天discord.py
。你知道吗
if channel.name == "General":
await ctx.send(f"{ctx.author.mention}needs help at{channel.mention})
else:
await ctx.send(f"{ctx.author}needs help at an unknown place")
每当有人写“h”的时候,我都要这样或者帮助,它会说:
@user needs help at #channel @specific role
你可以试试
如果您在cog中使用这个,请使用我的代码,如果您使用
bot
作为命令。你知道吗如果您在主命令中使用此命令,请使用
bot.get_user(ctx.author.id)
而不是我的命令。你知道吗要提到角色或用户,您应该在邮件中使用以下语法:
你知道吗<;@id>;你知道吗
因此,将“id”改为相应角色的id,这样您的代码将是:
相关问题 更多 >
编程相关推荐