From 84c779fcf45689fc5c8e5b526b4a5ca769870c96 Mon Sep 17 00:00:00 2001 From: Mattia Succurro Date: Sat, 19 Apr 2025 18:47:22 +0200 Subject: [PATCH] fix bug preventing registration of global commands --- CHANGELOG.md | 13 ++++++++----- src/register.ts | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 749ed68..0bbdc97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,15 @@ +## 0.2.1 (April 19, 2025) -## 0.2.0 (March 24, 2025) +* Fixed a bug preventing registration of global commands -* Removed references to terrorists in the Nassiryot Republic. -* Add `/coal` and `/version` commands. +## 0.2.0 (March 23, 2025) + +* Removed references to terrorists in the Nassiryot Republic +* Add `/coal` and `/version` commands ## 0.1.0 (January 19, 2025) -* Initial commit. -* Added `/wiki` and `/yroo` commands. +* Initial commit +* Added `/wiki` and `/yroo` commands diff --git a/src/register.ts b/src/register.ts index b981ec3..bab3ee3 100644 --- a/src/register.ts +++ b/src/register.ts @@ -44,7 +44,7 @@ if (process.env.GUILD_IDS === void 0){ console.warn('GUILD_IDS not set, registering commands globally'); } -const guilds = (process.env.GUILD_IDS ?? '').trim().split(/[\s,;]+/); +const guilds = (process.env.GUILD_IDS ?? '').trim().split(/[\s,;:]+/).filter(x => x.length > 0); const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);