aboutsummaryrefslogtreecommitdiff
path: root/src/commands/remove.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/remove.ts')
-rw-r--r--src/commands/remove.ts11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/commands/remove.ts b/src/commands/remove.ts
index c58fbdf..55c416f 100644
--- a/src/commands/remove.ts
+++ b/src/commands/remove.ts
@@ -3,7 +3,6 @@ import {inject, injectable} from 'inversify';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import Command from '.';
-import errorMsg from '../utils/error-msg.js';
import {SlashCommandBuilder} from '@discordjs/builders';
@injectable()
@@ -34,17 +33,11 @@ export default class implements Command {
const range = interaction.options.getInteger('range') ?? 1;
if (position < 1) {
- await interaction.reply({
- content: errorMsg('position must be greater than 0'),
- ephemeral: true,
- });
+ throw new Error('position must be at least 1');
}
if (range < 1) {
- await interaction.reply({
- content: errorMsg('range must be greater than 0'),
- ephemeral: true,
- });
+ throw new Error('range must be at least 1');
}
player.removeFromQueue(position, range);