Skip to content

Commit 1a5108c

Browse files
committed
games: Better error message for sniped start games
1 parent ca3bb98 commit 1a5108c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/ps/commands/games/core.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ export const command: PSCommand[] = Object.entries(Games).map(([_gameId, Game]):
226226
perms: Symbol.for('games.create'),
227227
async run({ message, arg, $T }): Promise<void> {
228228
const { game } = getGame(arg, { action: 'start', user: message.author.id }, { room: message.target, $T });
229+
if (game.started) throw new ChatError($T('GAME.ALREADY_STARTED'));
229230
if (!game.startable()) throw new ChatError($T('GAME.CANNOT_START'));
230231
game.start();
231232
game.closeSignups(false);

0 commit comments

Comments
 (0)