我的代码:
@commands.Cog.listener()
async def on_guild_join(self, guild):
general = find(lambda x: x.name == "general", guild.text_channels)
if general and general.permissions_for(guild.me).send_messages:
await general.send(f"Beep Boop. I've hopped on the server! {guild.owner}, "
f"it is advised that you run `.setup` command")
加入公会后,机器人说:Beep Boop. I've hopped on the server! foobar#1234, it is advised that you run .setup command
在这种情况下,Foobar#1234是公会的所有者。我也尝试过添加@before{guild.owner}
,这样看起来
await general.send(f"Beep Boop. I've hopped on the server! @{guild.owner}, "
f"it is advised that you run `.setup` command")
它实际上并没有标记公会的所有者。这可能吗
您可以使用^{}
相关问题 更多 >
编程相关推荐