From 6495c44c6850876fc28bad0922be4b6c60d49948 Mon Sep 17 00:00:00 2001 From: Kevin Kendzia Date: Sat, 23 Apr 2022 17:55:17 +0200 Subject: [PATCH] add /next command as alias for /skip (#629) Co-authored-by: Max Isom --- CHANGELOG.md | 3 +++ src/commands/next.ts | 10 ++++++++++ src/inversify.config.ts | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 src/commands/next.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index aa91ad6..fbf7608 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed a case-sensitive import issue +### Added +- Added a `/next` alias for `/skip` + ## [1.8.2] - 2022-03-27 ### Fixed - `/fseek` now works again diff --git a/src/commands/next.ts b/src/commands/next.ts new file mode 100644 index 0000000..a9796c0 --- /dev/null +++ b/src/commands/next.ts @@ -0,0 +1,10 @@ +import {injectable} from 'inversify'; +import Skip from './skip.js'; +import {SlashCommandBuilder} from '@discordjs/builders'; + +@injectable() +export default class extends Skip { + public readonly slashCommand = new SlashCommandBuilder() + .setName('next') + .setDescription('skip to the next song'); +} diff --git a/src/inversify.config.ts b/src/inversify.config.ts index 2119b98..e4c30e3 100644 --- a/src/inversify.config.ts +++ b/src/inversify.config.ts @@ -31,6 +31,7 @@ import Resume from './commands/resume.js'; import Seek from './commands/seek.js'; import Shuffle from './commands/shuffle.js'; import Skip from './commands/skip.js'; +import Next from './commands/next.js'; import Stop from './commands/stop.js'; import Unskip from './commands/unskip.js'; import ThirdParty from './services/third-party.js'; @@ -77,6 +78,7 @@ container.bind(TYPES.Services.SpotifyAPI).to(SpotifyAPI).inSingleton Seek, Shuffle, Skip, + Next, Stop, Unskip, ].forEach(command => {