mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 10:11:56 +01:00
🚨 Fix eslint warnings and remove old files
This commit is contained in:
parent
6c5b282bc0
commit
0e70791284
@ -1,10 +0,0 @@
|
||||
{
|
||||
"token": "",
|
||||
"server-address": "",
|
||||
"jellyfin-username": "",
|
||||
"jellyfin-password": "",
|
||||
"discord-prefix": "?",
|
||||
"jellyfin-app-name": "Jellyfin Discord Music Bot",
|
||||
"interactive-seek-bar-update-intervall": 10000,
|
||||
"log-level": "info"
|
||||
}
|
16
parseENV.js
16
parseENV.js
@ -1,16 +0,0 @@
|
||||
const fs = require("fs");
|
||||
const filename = "./config.json";
|
||||
const configfile = require(filename);
|
||||
|
||||
if (process.env.DISCORD_PREFIX) { configfile["discord-prefix"] = process.env.DISCORD_PREFIX; }
|
||||
if (process.env.DISCORD_TOKEN) { configfile.token = process.env.DISCORD_TOKEN; }
|
||||
if (process.env.JELLYFIN_SERVER_ADDRESS) { configfile["server-address"] = process.env.JELLYFIN_SERVER_ADDRESS; }
|
||||
if (process.env.JELLYFIN_USERNAME) { configfile["jellyfin-username"] = process.env.JELLYFIN_USERNAME; }
|
||||
if (process.env.JELLYFIN_PASSWORD) { configfile["jellyfin-password"] = process.env.JELLYFIN_PASSWORD; }
|
||||
if (process.env.JELLYFIN_APP_NAME) { configfile["jellyfin-app-name"] = process.env.JELLYFIN_APP_NAME; }
|
||||
if (process.env.MESSAGE_UPDATE_INTERVAL) { configfile["interactive-seek-bar-update-intervall"] = parseInt(process.env.MESSAGE_UPDATE_INTERVAL); }
|
||||
if (process.env.LOG_LEVEL) { configfile["log-level"] = process.env.LOG_LEVEL; }
|
||||
|
||||
fs.writeFile(filename, JSON.stringify(configfile, null, 1), (err) => {
|
||||
if (err) return console.error(err);
|
||||
});
|
@ -1,5 +1,5 @@
|
||||
import { Module, OnModuleDestroy, OnModuleInit } from "@nestjs/common";
|
||||
import { DiscordService } from "./discord.service";
|
||||
import { Module, OnModuleDestroy, OnModuleInit } from '@nestjs/common';
|
||||
import { DiscordService } from './discord.service';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
@ -8,7 +8,6 @@ import { DiscordService } from "./discord.service";
|
||||
exports: [DiscordService],
|
||||
})
|
||||
export class DiscordClientModule implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
constructor(private discordService: DiscordService) {}
|
||||
onModuleDestroy() {
|
||||
this.discordService.destroyClient();
|
||||
@ -19,4 +18,4 @@ export class DiscordClientModule implements OnModuleInit, OnModuleDestroy {
|
||||
this.discordService.registerEventHandlers();
|
||||
this.discordService.connectAndLogin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||
|
||||
import { ActivityType, Client } from 'discord.js';
|
||||
import { Client } from 'discord.js';
|
||||
|
||||
@Injectable()
|
||||
export class DiscordService {
|
||||
|
Loading…
Reference in New Issue
Block a user