aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meta.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meta.rs')
-rw-r--r--src/commands/meta.rs13
1 files changed, 12 insertions, 1 deletions
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(())
+}