2023-04-15 22:06:35 +02:00
|
|
|
import dotenv from "dotenv"
|
2023-06-10 14:23:10 +02:00
|
|
|
import { AddListingProviderRequestToJSON } from "./jellyfin"
|
2023-04-15 22:06:35 +02:00
|
|
|
dotenv.config()
|
|
|
|
|
2023-04-16 02:02:15 +02:00
|
|
|
interface options {
|
|
|
|
[k: string]: boolean | number | string | undefined
|
|
|
|
}
|
|
|
|
interface bodyParserOptions {
|
|
|
|
urlEncodedOptions: options,
|
|
|
|
jsonOptions: options
|
|
|
|
}
|
|
|
|
export interface Config {
|
|
|
|
server: { bodyParser: bodyParserOptions },
|
|
|
|
bot: {
|
|
|
|
debug: boolean
|
|
|
|
silent: boolean
|
|
|
|
token: string
|
|
|
|
guild_id: string
|
|
|
|
client_id: string
|
|
|
|
jellfin_token: string
|
|
|
|
jellyfin_url: string
|
|
|
|
port: number
|
2023-06-04 03:14:45 +02:00
|
|
|
workaround_token: string
|
2023-06-08 17:10:06 +02:00
|
|
|
watcher_role: string
|
|
|
|
jf_admin_role: string
|
2023-06-13 18:18:26 +02:00
|
|
|
announcement_role: string
|
2023-06-10 14:23:10 +02:00
|
|
|
announcement_channel_id: string
|
2023-06-12 20:31:52 +02:00
|
|
|
jf_collection_id: string
|
2023-04-16 02:02:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
export const config: Config = {
|
|
|
|
server: {
|
|
|
|
bodyParser: {
|
|
|
|
urlEncodedOptions: {
|
|
|
|
inflate: true,
|
|
|
|
limit: '5mb',
|
|
|
|
type: 'application/x-www-form-urlencoded',
|
|
|
|
extended: true,
|
|
|
|
parameterLimit: 1000
|
|
|
|
},
|
|
|
|
jsonOptions: {
|
|
|
|
inflate: true,
|
|
|
|
limit: '5mb',
|
|
|
|
type: 'application/json',
|
|
|
|
strict: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
bot: {
|
|
|
|
debug: true,
|
|
|
|
silent: false,
|
|
|
|
port: 1234,
|
|
|
|
token: process.env.BOT_TOKEN ?? "",
|
|
|
|
guild_id: process.env.GUILD_ID ?? "",
|
|
|
|
client_id: process.env.CLIENT_ID ?? "",
|
|
|
|
jellfin_token: process.env.JELLYFIN_TOKEN ?? "",
|
2023-06-04 03:14:45 +02:00
|
|
|
jellyfin_url: process.env.JELLYFIN_URL ?? "",
|
2023-06-08 17:10:06 +02:00
|
|
|
workaround_token: process.env.TOKEN ?? "",
|
|
|
|
watcher_role: process.env.WATCHER_ROLE ?? "",
|
2023-06-10 14:23:10 +02:00
|
|
|
jf_admin_role: process.env.ADMIN_ROLE ?? "",
|
2023-06-13 18:18:26 +02:00
|
|
|
announcement_role: process.env.WATCHPARTY_ANNOUNCEMENT_ROLE ?? "",
|
2023-06-12 20:31:52 +02:00
|
|
|
announcement_channel_id: process.env.CHANNEL_ID ?? "",
|
|
|
|
jf_collection_id: process.env.JELLYFIN_COLLECTION_ID ?? ""
|
2023-04-16 02:02:15 +02:00
|
|
|
}
|
2023-04-15 22:06:35 +02:00
|
|
|
}
|