Skip to content

Commit 3835847

Browse files
committed
fix(permissions): check for bot permission instead users
1 parent a6ffe27 commit 3835847

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/command/playmatch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use uuid::Uuid;
3030
#[poise::command(
3131
slash_command,
3232
category = "Playmatch",
33-
required_permissions = "SEND_MESSAGES | EMBED_LINKS",
33+
required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS",
3434
subcommands("list_companies", "list_platforms")
3535
)]
3636
pub async fn list(_: CommandContext<'_>) -> CommandResult {
@@ -41,7 +41,7 @@ pub async fn list(_: CommandContext<'_>) -> CommandResult {
4141
#[poise::command(
4242
slash_command,
4343
category = "Playmatch",
44-
required_permissions = "SEND_MESSAGES | EMBED_LINKS",
44+
required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS",
4545
rename = "match",
4646
subcommands("manual_match_game", "manual_match_platform", "manual_match_company")
4747
)]
@@ -53,7 +53,7 @@ pub async fn r#match(_: CommandContext<'_>) -> CommandResult {
5353
#[poise::command(
5454
slash_command,
5555
category = "Playmatch",
56-
required_permissions = "SEND_MESSAGES | EMBED_LINKS",
56+
required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS",
5757
subcommands(
5858
"create_platform_suggestion",
5959
"create_company_suggestion",

src/command/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use poise::CreateReply;
55
#[poise::command(
66
slash_command,
77
category = "Util",
8-
required_permissions = "SEND_MESSAGES"
8+
required_bot_permissions = "SEND_MESSAGES"
99
)]
1010
pub async fn help(
1111
ctx: CommandContext<'_>,
@@ -24,7 +24,7 @@ Type /help command for more info on a command.",
2424
#[poise::command(
2525
slash_command,
2626
category = "Util",
27-
required_permissions = "SEND_MESSAGES"
27+
required_bot_permissions = "SEND_MESSAGES"
2828
)]
2929
pub async fn ping(ctx: CommandContext<'_>) -> CommandResult {
3030
let handle = ctx.reply("Calculating....").await?;

0 commit comments

Comments
 (0)