简体   繁体   中英

Mention Role with Hikari and Lighbulb

I want to mention specific role when I use / with hikari my code:

@plugin.command
@lightbulb.command('tag', 'test tag!')
@lightbulb.implements(lightbulb.SlashCommand)
async def tag(ctx):
    await ctx.respond("<@&1067308654342197269>")

Command work, but I don't get any mention from my bot bot run

I want to get mention like this tag

What should I do with my code?

Solved lol, by using

role_mentions=True

@plugin.command
@lightbulb.command('tag', 'test tag!')
@lightbulb.implements(lightbulb.SlashCommand)
async def tag(ctx: lightbulb.Context) -> None:
    await ctx.respond(f"<@&1067308654342197269>", role_mentions=True)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM