diff options
| author | Max Isom <[email protected]> | 2022-01-26 22:30:58 -0500 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2022-01-26 22:30:58 -0500 |
| commit | 2e5e509b3233b1eb6c2b5834308d0cecfbb58634 (patch) | |
| tree | 9c97778161af3033c64393a9114892cb0d72e217 /src/commands/pause.ts | |
| parent | aacb107f43db6b8c53d160b5913701959f81cf09 (diff) | |
| download | muse-2e5e509b3233b1eb6c2b5834308d0cecfbb58634.tar.xz muse-2e5e509b3233b1eb6c2b5834308d0cecfbb58634.zip | |
Throw errors in command handlers
Diffstat (limited to 'src/commands/pause.ts')
| -rw-r--r-- | src/commands/pause.ts | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/commands/pause.ts b/src/commands/pause.ts index 5d87b87..fc98bdf 100644 --- a/src/commands/pause.ts +++ b/src/commands/pause.ts @@ -4,7 +4,6 @@ import {TYPES} from '../types.js'; import {inject, injectable} from 'inversify'; import PlayerManager from '../managers/player.js'; import {STATUS} from '../services/player.js'; -import errorMsg from '../utils/error-msg.js'; import Command from '.'; @injectable() @@ -25,11 +24,7 @@ export default class implements Command { const player = this.playerManager.get(interaction.guild!.id); if (player.status !== STATUS.PLAYING) { - await interaction.reply({ - content: errorMsg('not currently playing'), - ephemeral: true, - }); - return; + throw new Error('not currently playing'); } player.pause(); |
