diff --git a/server/assets/images/auswahl_anmeldung.png b/server/assets/images/auswahl_anmeldung.png new file mode 100644 index 0000000..9cb8c76 Binary files /dev/null and b/server/assets/images/auswahl_anmeldung.png differ diff --git a/server/assets/images/gruppe_beitreten.png b/server/assets/images/gruppe_beitreten.png new file mode 100644 index 0000000..d9b8038 Binary files /dev/null and b/server/assets/images/gruppe_beitreten.png differ diff --git a/server/assets/images/gruppe_verlassen.png b/server/assets/images/gruppe_verlassen.png new file mode 100644 index 0000000..751beac Binary files /dev/null and b/server/assets/images/gruppe_verlassen.png differ diff --git a/server/assets/images/jellyfin_ubersicht.png b/server/assets/images/jellyfin_ubersicht.png new file mode 100644 index 0000000..734c4e2 Binary files /dev/null and b/server/assets/images/jellyfin_ubersicht.png differ diff --git a/server/assets/images/login_screen.png b/server/assets/images/login_screen.png new file mode 100644 index 0000000..03b1bce Binary files /dev/null and b/server/assets/images/login_screen.png differ diff --git a/server/assets/images/server_verbindung.png b/server/assets/images/server_verbindung.png new file mode 100644 index 0000000..de776fb Binary files /dev/null and b/server/assets/images/server_verbindung.png differ diff --git a/server/assets/images/set_splashscreen.png b/server/assets/images/set_splashscreen.png new file mode 100644 index 0000000..1f04a04 Binary files /dev/null and b/server/assets/images/set_splashscreen.png differ diff --git a/server/assets/images/start_screen.png b/server/assets/images/start_screen.png new file mode 100644 index 0000000..4b14159 Binary files /dev/null and b/server/assets/images/start_screen.png differ diff --git a/server/assets/images/wiedergabe_fortsetzen.png b/server/assets/images/wiedergabe_fortsetzen.png new file mode 100644 index 0000000..6b69e71 Binary files /dev/null and b/server/assets/images/wiedergabe_fortsetzen.png differ diff --git a/server/commands/mitgucken.ts b/server/commands/mitgucken.ts new file mode 100644 index 0000000..4d31bca --- /dev/null +++ b/server/commands/mitgucken.ts @@ -0,0 +1,124 @@ +import { Command } from '../structures/command' +import { RunOptions } from '../types/commandTypes' +import { AttachmentBuilder, APIEmbed } from 'discord.js' +import { v4 as uuid } from 'uuid' +import { logger } from '../logger' + +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() + 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') + const attachedImages = [splashScreen, startScreen, serverConnection, accountChoice, loginScreen, overview, resume, leavegroup, joingroup] + interaction.interaction.followUp('Ich schicke dir einen Guide per DM!') + logger.info(`Using images: ${JSON.stringify(attachedImages)}`) + 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 }) + const userDMchannel = await interaction.interaction.user.createDM() + userDMchannel.send({ embeds: embedList, files: attachedImages }) + } +})