Compare commits
No commits in common. "8ae5fd2c1b8d64b6293b9a89691b0adae1edd03e" and "3294d9ca7775a4296dd21e32ba8d6bc726aef575" have entirely different histories.
8ae5fd2c1b
...
3294d9ca77
3
index.ts
@ -2,15 +2,12 @@ import { ExtendedClient } from "./server/structures/client"
|
||||
import { config } from "./server/configuration"
|
||||
import { logger } from "./server/logger"
|
||||
import { JellyfinHandler } from "./server/jellyfin/handler"
|
||||
import { attachedImages } from "./server/assets/attachments"
|
||||
const requestId = 'startup'
|
||||
|
||||
export const jellyfinHandler = new JellyfinHandler(config)
|
||||
|
||||
export const client = new ExtendedClient(jellyfinHandler)
|
||||
|
||||
export const attachmentImages = attachedImages
|
||||
|
||||
async function init() {
|
||||
try {
|
||||
const users = await jellyfinHandler.getCurrentUsers("", requestId)
|
||||
|
@ -1,12 +0,0 @@
|
||||
import { AttachmentBuilder } from "discord.js"
|
||||
|
||||
const splashScreen = new AttachmentBuilder('./server/assets/images/set_splashscreen.png')
|
||||
const startScreen = new AttachmentBuilder('./server/assets/images/start_screen.png')
|
||||
const serverConnection = new AttachmentBuilder('./server/assets/images/server_verbindung.png')
|
||||
const accountChoice = new AttachmentBuilder('./server/assets/images/auswahl_anmeldung.png')
|
||||
const loginScreen = new AttachmentBuilder('./server/assets/images/login_screen.png')
|
||||
const overview = new AttachmentBuilder('./server/assets/images/jellyfin_ubersicht.png')
|
||||
const joingroup = new AttachmentBuilder('./server/assets/images/gruppe_beitreten.png')
|
||||
const resume = new AttachmentBuilder('./server/assets/images/wiedergabe_fortsetzen.png')
|
||||
const leavegroup = new AttachmentBuilder('./server/assets/images/gruppe_verlassen.png')
|
||||
export const attachedImages = [splashScreen, startScreen, serverConnection, accountChoice, loginScreen, overview, resume, leavegroup, joingroup]
|
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 424 KiB |
Before Width: | Height: | Size: 892 KiB |
Before Width: | Height: | Size: 495 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 436 KiB |
@ -1,115 +0,0 @@
|
||||
import { Command } from '../structures/command'
|
||||
import { RunOptions } from '../types/commandTypes'
|
||||
import { APIEmbed } from 'discord.js'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { logger } from '../logger'
|
||||
import { attachmentImages } from '../..'
|
||||
|
||||
const color = 0x0099FF
|
||||
export default new Command({
|
||||
name: 'mitgucken',
|
||||
description: 'Erfahre wie die Verbindung mit Jellyfin funktioniert und eine WatchTogether Gruppe funktioniert.',
|
||||
options: [],
|
||||
run: async (interaction: RunOptions) => {
|
||||
const requestId = uuid()
|
||||
interaction.interaction.followUp('Ich schicke dir einen Guide per DM!')
|
||||
const embedList: APIEmbed[] = []
|
||||
// DownloadLink
|
||||
embedList.push({
|
||||
color,
|
||||
title: 'Jellyfin Media Player',
|
||||
description: 'Du kannst den Jellyfin Media Player von github herunterladen.\n Der Mediaplayer muss genutzt werden, da ein Schauen direkt über das Webinterface den Server zum Schmelzen bringt.',
|
||||
fields: [
|
||||
{ name: "Windows", value: "https://github.com/jellyfin/jellyfin-media-player/releases/download/v1.9.1/JellyfinMediaPlayer-1.9.1-windows-x64.exe" },
|
||||
{ name: "Mac", value: "https://github.com/jellyfin/jellyfin-media-player/releases/download/v1.9.1/JellyfinMediaPlayer-1.9.1-macos-notarized.dmg" }
|
||||
]
|
||||
})
|
||||
// Installation
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Installation",
|
||||
description: "Führe die Datei aus und installiere den Jellyfin Media Player an den Ort deiner Wahl",
|
||||
image: {
|
||||
url: 'attachment://set_splashscreen.png'
|
||||
}
|
||||
})
|
||||
// Login
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Server Auswahl",
|
||||
description: "Die Jellyfin App kann sich mit mehreren Servern verbinden.\n Hattest du noch nie eine Server Verbindung wähle hier 'Server hinzufügen'.",
|
||||
image: {
|
||||
url: 'attachment://start_screen.png'
|
||||
}
|
||||
})
|
||||
// Server Address
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Server Verbindung",
|
||||
description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her",
|
||||
fields: [
|
||||
{ name: "Server Adresse", value: "https://media.hartzarett.ruhr" }
|
||||
],
|
||||
image: {
|
||||
url: 'attachment://server_verbindung.png'
|
||||
}
|
||||
})
|
||||
// Account choice
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Account Auswahl",
|
||||
description: "In der Regel sind die Accounts aus Datenschutzgründen versteckt.\nWähle 'Manuelle Anmeldung' aus",
|
||||
image: {
|
||||
url: 'attachment://auswahl_anmeldung.png'
|
||||
}
|
||||
}),
|
||||
// password screen
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Login",
|
||||
description: "Melde dich mit dem Usernamen und Passwort an, welches dir von mir zugeschickt wird.",
|
||||
image: {
|
||||
url: 'attachment://login_screen.png'
|
||||
}
|
||||
})
|
||||
embedList.push({
|
||||
color,
|
||||
title: "SyncPlay Menü",
|
||||
image: {
|
||||
url: 'attachment://jellyfin_ubersicht.png'
|
||||
},
|
||||
description: "Im Hauptbildschirm findest du die 'SyncPlay' Einstellungen oben rechts.",
|
||||
})
|
||||
// join group
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Gruppe beitreten",
|
||||
image: {
|
||||
url: 'attachment://gruppe_beitreten.png'
|
||||
},
|
||||
description: "Suche dir aus dem Dropdown die SyncPlay Gruppe aus, die zu deinem Event gehört.",
|
||||
})
|
||||
// leave group
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Gruppe verlassen",
|
||||
image: {
|
||||
url: 'attachment://gruppe_verlassen.png'
|
||||
},
|
||||
description: "Wenn du die Watchparty verlassen möchtest, kannst du das ebenfalls über das Menü oben rechts tun.",
|
||||
})
|
||||
// resume playback
|
||||
embedList.push({
|
||||
color,
|
||||
title: "Wiedergabe fortsetzen",
|
||||
image: {
|
||||
url: 'attachment://wiedergabe_fortsetzen.png'
|
||||
},
|
||||
description: "Wenn du aus der Watchparty rausgeflogen bist, oder die Wiedergabe verlassen hast, kannst du über das Menü oben rechts auch wieder zurückkehren.",
|
||||
})
|
||||
//logger.info(`Trying to use ${splashScreen.name}`, { requestId, guildId: interaction.interaction.guild?.id })
|
||||
logger.info(`Sending guide to ${interaction.interaction.user.id}`, { requestId, guildId: interaction.interaction.guild?.id })
|
||||
const userDMchannel = await interaction.interaction.user.createDM()
|
||||
userDMchannel.send({ embeds: embedList, files: attachmentImages})
|
||||
}
|
||||
})
|