From 05b291adf3c056614eec622174fe36a37367c576 Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Wed, 31 Aug 2022 20:24:26 -0400 Subject: Add playing status w/ link to site and owner command to update --- src/commands/meta.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/commands/meta.rs') diff --git a/src/commands/meta.rs b/src/commands/meta.rs index 681d5a5..c77f048 100644 --- a/src/commands/meta.rs +++ b/src/commands/meta.rs @@ -1,5 +1,5 @@ use crate::{Context, Error}; -use poise::serenity_prelude as serenity; +use poise::serenity_prelude::{self as serenity, Activity}; /// Pings the bot #[poise::command(prefix_command, slash_command)] @@ -45,3 +45,14 @@ pub async fn userinfo( ) -> Result<(), Error> { Ok(()) } + +#[poise::command(prefix_command, slash_command, owners_only, hide_in_help)] +pub async fn set_status( + ctx: Context<'_>, + #[description = "Custom game to play"] + game: String, + ) -> Result<(), Error> { + ctx.discord().set_activity(Activity::playing(game)).await; + + Ok(()) +} -- cgit v1.2.3