mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
Remove /config set-role
This commit is contained in:
parent
dd89cfcee9
commit
1ad6cb5ebe
|
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Fully remove `/config set-role`
|
||||
|
||||
## [2.0.1] - 2022-05-13
|
||||
### Changed
|
||||
|
|
21
migrations/20220514164137_remove_role_id/migration.sql
Normal file
21
migrations/20220514164137_remove_role_id/migration.sql
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `roleId` on the `Setting` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Setting" (
|
||||
"guildId" TEXT NOT NULL PRIMARY KEY,
|
||||
"playlistLimit" INTEGER NOT NULL DEFAULT 50,
|
||||
"secondsToWaitAfterQueueEmpties" INTEGER NOT NULL DEFAULT 30,
|
||||
"leaveIfNoListeners" BOOLEAN NOT NULL DEFAULT true,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
INSERT INTO "new_Setting" ("createdAt", "guildId", "leaveIfNoListeners", "playlistLimit", "secondsToWaitAfterQueueEmpties", "updatedAt") SELECT "createdAt", "guildId", "leaveIfNoListeners", "playlistLimit", "secondsToWaitAfterQueueEmpties", "updatedAt" FROM "Setting";
|
||||
DROP TABLE "Setting";
|
||||
ALTER TABLE "new_Setting" RENAME TO "Setting";
|
||||
PRAGMA foreign_key_check;
|
||||
PRAGMA foreign_keys=ON;
|
|
@ -28,7 +28,6 @@ model Setting {
|
|||
playlistLimit Int @default(50)
|
||||
secondsToWaitAfterQueueEmpties Int @default(30)
|
||||
leaveIfNoListeners Boolean @default(true)
|
||||
roleId String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
|
|
@ -17,13 +17,6 @@ export default class implements Command {
|
|||
.setName('limit')
|
||||
.setDescription('maximum number of tracks')
|
||||
.setRequired(true)))
|
||||
.addSubcommand(subcommand => subcommand
|
||||
.setName('set-role')
|
||||
.setDescription('set the role that is allowed to use the bot')
|
||||
.addRoleOption(option => option
|
||||
.setName('role')
|
||||
.setDescription('allowed role')
|
||||
.setRequired(true)))
|
||||
.addSubcommand(subcommand => subcommand
|
||||
.setName('set-wait-after-queue-empties')
|
||||
.setDescription('set the time to wait before leaving the voice channel when queue empties')
|
||||
|
@ -111,7 +104,6 @@ export default class implements Command {
|
|||
|
||||
const settingsToShow = {
|
||||
'Playlist Limit': config.playlistLimit,
|
||||
Role: config.roleId ? `<@&${config.roleId}>` : 'not set',
|
||||
'Wait before leaving after queue empty': config.secondsToWaitAfterQueueEmpties === 0
|
||||
? 'never leave'
|
||||
: `${config.secondsToWaitAfterQueueEmpties}s`,
|
||||
|
|
Loading…
Reference in a new issue