Skip to content

Commit c87b9cc

Browse files
committed
chore: Make sure we're promoting/demoting someone
1 parent abf1a2b commit c87b9cc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ps/commands/auth.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const command: PSCommand[] = IS_ENABLED.DB
5959
perms,
6060
async run({ message, arg, checkPermissions, $T }) {
6161
const userList = arg.split(',');
62-
const users = userList.map(toId);
62+
const users = userList.map(toId).filter(Boolean);
6363
if (!users.length) throw new ChatError('Who do you want to promote?' as ToTranslate);
6464
const roomConfig = PSRoomConfigs[message.target.id];
6565
if (roomConfig?.auth) {
@@ -93,7 +93,7 @@ export const command: PSCommand[] = IS_ENABLED.DB
9393
category: ['utility'],
9494
async run({ message, arg, checkPermissions, $T }) {
9595
const userList = arg.split(',');
96-
const users = userList.map(toId);
96+
const users = userList.map(toId).filter(Boolean);
9797
if (!users.length) throw new ChatError('Who do you want to promote?' as ToTranslate);
9898
const roomConfig = PSRoomConfigs[message.target.id];
9999
if (roomConfig?.auth) {

0 commit comments

Comments
 (0)