Skip to content

Commit

Permalink
Use context for banned role id
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Mar 22, 2024
1 parent aa6f986 commit faaa853
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/handler/cmdHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { hasBotDenyRole } from "../utils/userUtils.js";
import { isMessageInBotSpam } from "../utils/channelUtils.js";
import type { BotContext } from "../context.js";

const config = getConfig();

/**
* A message that the bot can pass to command handlers.
* For example, it ensures that there is a member (and it's not a DM)
Expand Down Expand Up @@ -113,7 +111,7 @@ export default async function (

if (
message.member.roles.cache.some(
r => r.id === config.ids.banned_role_id,
r => r.id === context.roles.banned.id,
)
) {
return "Da haste aber Schwein gehabt";
Expand Down

0 comments on commit faaa853

Please sign in to comment.