add /status command

This commit is contained in:
Riley Housden 2022-08-21 18:34:13 -04:00
parent 18f8234735
commit 8fa30420ef
Signed by: InValidFire
GPG key ID: 0D6208F6DF56B4D8

View file

@ -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)