From 8fa30420eff4c6c42bc638cf6ea590600ae863e8 Mon Sep 17 00:00:00 2001 From: Riley Housden Date: Sun, 21 Aug 2022 18:34:13 -0400 Subject: [PATCH] add /status command --- ext/profile.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext/profile.py b/ext/profile.py index 3fc56a3..601471b 100644 --- a/ext/profile.py +++ b/ext/profile.py @@ -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)