Skip to content

Commit e99dd57

Browse files
committed
fix(webhook): another small fix to webhook name filtering
1 parent 16ce48d commit e99dd57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/webhook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ export default class WebhookCommand extends SlashCommand {
546546
* - It follows the nickname guidelines in the Usernames and Nicknames documentation, with an exception that webhook names can be up to 80 characters
547547
* https://discord.com/developers/docs/resources/webhook#create-webhook
548548
*/
549-
const boardName = board.name.toLowerCase();
549+
const boardName = (ctx.options.add.name || board.name).toLowerCase();
550550
const nameInvalid = BLACKLISTED_WEBHOOK_SUBSTRINGS.find((str) => boardName.includes(str)) || BLACKLISTED_WEBHOOK_NAMES.includes(boardName);
551551
const webhookName = (nameInvalid ? '' : truncate(ctx.options.add.name || board.name, 80)) || t('webhook.new_wh_name');
552552
try {

0 commit comments

Comments
 (0)