add /status command
This commit is contained in:
parent
18f8234735
commit
8fa30420ef
1 changed files with 11 additions and 0 deletions
|
@ -16,6 +16,17 @@ async def set_avatar(ctx: lightbulb.Context) -> None:
|
|||
await ctx.respond(embed)
|
||||
|
||||
|
||||
@plugin.command
|
||||
@lightbulb.option("text", "text to set as custom status", type=hikari.Attachment, required=True)
|
||||
@lightbulb.add_checks(lightbulb.owner_only)
|
||||
@lightbulb.command("status", "set the bot status.", ephemeral=True)
|
||||
@lightbulb.implements(lightbulb.SlashCommand)
|
||||
async def set_status(ctx: lightbulb.Context) -> None:
|
||||
await ctx.bot.update_presence(activity=hikari.Activity(name=ctx.options.text, type=hikari.ActivityType.CUSTOM))
|
||||
embed = hikari.Embed(title="New status set!", description=f"New Status: {ctx.options.text}")
|
||||
await ctx.respond(embed)
|
||||
|
||||
|
||||
def load(bot: lightbulb.BotApp):
|
||||
bot.add_plugin(plugin)
|
||||
|
||||
|
|
Loading…
Reference in a new issue