Add automatic creation of vote message with random movies #16

Merged
kenobi merged 11 commits from feat/voting into master 2023-06-12 21:00:17 +02:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit f3669ec34f - Show all commits

View File

@ -24,6 +24,7 @@ export interface Config {
watcher_role: string
jf_admin_role: string
announcement_channel_id: string
jf_collection_id: string
}
}
export const config: Config = {
@ -56,6 +57,7 @@ export const config: Config = {
workaround_token: process.env.TOKEN ?? "",
watcher_role: process.env.WATCHER_ROLE ?? "",
jf_admin_role: process.env.ADMIN_ROLE ?? "",
announcement_channel_id: process.env.CHANNEL_ID ?? ""
announcement_channel_id: process.env.CHANNEL_ID ?? "",
jf_collection_id: process.env.JELLYFIN_COLLECTION_ID ?? ""
}
}

View File

@ -236,7 +236,7 @@ export class JellyfinHandler {
const searchParams: GetItemsRequest = {
userId: liloJfUser?.id,
parentId: "f137a2dd21bbc1b99aa5c0f6bf02a805" // collection ID for all movies
parentId: this.config.bot.jf_collection_id // collection ID for all movies
kenobi marked this conversation as resolved Outdated

Might be best served as an env var.

Might be best served as an env var.

fixed

fixed
}
const movies = (await (this.moviesApi.getItems(searchParams))).items?.filter(item => !item.isFolder)
// logger.debug(JSON.stringify(movies, null, 2), { guildId: guildId, requestId })