mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-28 01:32:42 +02:00
Add SponsorBlock support (#1013)
This commit is contained in:
parent
8e08919206
commit
a27598c50a
7 changed files with 379 additions and 344 deletions
|
@ -22,6 +22,8 @@ const CONFIG_MAP = {
|
|||
BOT_ACTIVITY_TYPE: process.env.BOT_ACTIVITY_TYPE ?? 'LISTENING',
|
||||
BOT_ACTIVITY_URL: process.env.BOT_ACTIVITY_URL ?? '',
|
||||
BOT_ACTIVITY: process.env.BOT_ACTIVITY ?? 'music',
|
||||
ENABLE_SPONSORBLOCK: process.env.ENABLE_SPONSORBLOCK === 'true',
|
||||
SPONSORBLOCK_TIMEOUT: process.env.ENABLE_SPONSORBLOCK ?? 5,
|
||||
} as const;
|
||||
|
||||
const BOT_ACTIVITY_TYPE_MAP = {
|
||||
|
@ -45,6 +47,8 @@ export default class Config {
|
|||
readonly BOT_ACTIVITY_TYPE!: Exclude<ActivityType, ActivityType.Custom>;
|
||||
readonly BOT_ACTIVITY_URL!: string;
|
||||
readonly BOT_ACTIVITY!: string;
|
||||
readonly ENABLE_SPONSORBLOCK!: boolean;
|
||||
readonly SPONSORBLOCK_TIMEOUT!: number;
|
||||
|
||||
constructor() {
|
||||
for (const [key, value] of Object.entries(CONFIG_MAP)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue