add 'mitgucken' guide on how to join JF Syncplay group #12
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/auswahl_anmeldung.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 67 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/gruppe_beitreten.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 424 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/gruppe_verlassen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 892 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/jellyfin_ubersicht.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 495 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/login_screen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 50 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/server_verbindung.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 53 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/set_splashscreen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 19 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/start_screen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 84 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								server/assets/images/wiedergabe_fortsetzen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 436 KiB  | 
							
								
								
									
										124
									
								
								server/commands/mitgucken.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -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 })
 | 
			
		||||
  }
 | 
			
		||||
})
 | 
			
		||||