From 2c2634925d11ce81b08739ed1ddf6c8d5a2a0b0b Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Sun, 2 Jul 2023 16:48:42 -0600 Subject: [PATCH] Removed guild requirement for several commands --- src/discord/album.rs | 4 ---- src/discord/fren_coin.rs | 1 - src/discord/joke.rs | 2 -- src/discord/motivate.rs | 4 ---- 4 files changed, 11 deletions(-) diff --git a/src/discord/album.rs b/src/discord/album.rs index 9c5e259..3b25609 100644 --- a/src/discord/album.rs +++ b/src/discord/album.rs @@ -12,7 +12,6 @@ use serenity::model::channel::Message; pub struct AlbumCmd; #[command] -#[only_in(guilds)] #[min_args(1)] #[description("Add an image to an album")] #[usage("")] @@ -59,7 +58,6 @@ async fn add_image(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul } #[command] -#[only_in(guilds)] #[min_args(1)] #[description("Bulk add images")] #[usage("")] @@ -113,7 +111,6 @@ async fn import_from_file(ctx: &Context, msg: &Message, mut args: Args) -> Comma } #[command] -#[only_in(guilds)] #[max_args(1)] #[description("Remove an imgur album command.")] #[usage("")] @@ -154,7 +151,6 @@ async fn remove_album(ctx: &Context, msg: &Message, args: Args) -> CommandResult #[command] #[aliases("albums")] #[description("List all album commands.")] -#[only_in(guilds)] async fn list_albums(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { let data = ctx.data.read().await; diff --git a/src/discord/fren_coin.rs b/src/discord/fren_coin.rs index 880a7ef..d90f6b1 100644 --- a/src/discord/fren_coin.rs +++ b/src/discord/fren_coin.rs @@ -16,7 +16,6 @@ pub struct FrenCoin; #[command] #[description("Get your current balance")] #[aliases("audit")] -#[only_in(guilds)] async fn balance(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let mut data = ctx.data.write().await; let global_data = data.get_mut::().unwrap(); diff --git a/src/discord/joke.rs b/src/discord/joke.rs index db7cc75..119bc99 100644 --- a/src/discord/joke.rs +++ b/src/discord/joke.rs @@ -27,7 +27,6 @@ struct DadJoke { } #[command] -#[only_in(guilds)] #[aliases("dad")] #[description("Ask your dad")] async fn dad_joke(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { @@ -223,7 +222,6 @@ async fn roll(ctx: &Context, msg: &Message, args: Args) -> CommandResult { } #[command] -#[only_in(guilds)] #[bucket = "bad_apple"] async fn bad_apple(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { let mut frames = BAD_APPLE.split('|'); diff --git a/src/discord/motivate.rs b/src/discord/motivate.rs index b829a73..9f71680 100644 --- a/src/discord/motivate.rs +++ b/src/discord/motivate.rs @@ -58,7 +58,6 @@ pub async fn create_motivation_image(motivation: Motivation) -> Result, } #[command] -#[only_in(guilds)] #[description("Let's give you motivation")] async fn motivation(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { let data = ctx.data.read().await; @@ -84,7 +83,6 @@ async fn motivation(ctx: &Context, msg: &Message, _args: Args) -> CommandResult } #[command] -#[only_in(guilds)] #[description("Add imgur album to the motivation generator")] async fn motivation_add_album(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let data = ctx.data.read().await; @@ -100,7 +98,6 @@ async fn motivation_add_album(ctx: &Context, msg: &Message, args: Args) -> Comma } #[command] -#[only_in(guilds)] #[description("Add an action to the motivation generator")] async fn motivation_add_action(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let data = ctx.data.read().await; @@ -116,7 +113,6 @@ async fn motivation_add_action(ctx: &Context, msg: &Message, args: Args) -> Comm } #[command] -#[only_in(guilds)] #[description("Add goal to the motivation generator")] async fn motivation_add_goal(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let data = ctx.data.read().await;