Compare commits
9 Commits
670a64af22
...
59f5b34e5a
Author | SHA1 | Date | |
---|---|---|---|
59f5b34e5a | |||
f5928049ea | |||
99905f98d0 | |||
1e6a75687a | |||
2c09033c3f | |||
ce4441cee3 | |||
7c8072b295 | |||
7899aac5ce | |||
26c2d91252 |
17
.gitea/workflows/compile.yaml
Normal file
17
.gitea/workflows/compile.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Compile the repository
|
||||||
|
on: [push]
|
||||||
|
env:
|
||||||
|
REGISTRY: gitea.brudi.xyz
|
||||||
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
|
USER: ${{ gitea.actor }}
|
||||||
|
jobs:
|
||||||
|
compile:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build Container
|
||||||
|
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" .
|
@ -1,6 +1,9 @@
|
|||||||
name: Build a docker image for node-jellyfin-role-bot
|
name: Build a docker image for node-jellyfin-role-bot
|
||||||
run-name: ${{ gitea.actor }} is building an image
|
run-name: ${{ gitea.actor }} is building an image
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
env:
|
env:
|
||||||
REGISTRY: gitea.brudi.xyz
|
REGISTRY: gitea.brudi.xyz
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
@ -8,6 +11,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build-docker-image:
|
build-docker-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: gitea.ref == 'refs/heads/master'
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@ -15,9 +19,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
- name: Get Package Version
|
||||||
|
run: VERSION = node -p "require('./package.json').version"
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
run: docker login -u ${{ env.USER }} -p ${{ secrets.TOKEN }} ${{ env.REGISTRY }}
|
run: docker login -u ${{ env.USER }} -p ${{ secrets.TOKEN }} ${{ env.REGISTRY }}
|
||||||
- name: Build Container
|
- name: Build Container
|
||||||
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" .
|
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}".
|
||||||
- name: Push Container
|
- name: Push Container
|
||||||
run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
|
run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
|
||||||
|
@ -5,7 +5,7 @@ import { accountChoice, joingroup, leavegroup, loginScreen, overview, resume, se
|
|||||||
import { logger } from '../logger'
|
import { logger } from '../logger'
|
||||||
import { Command } from '../structures/command'
|
import { Command } from '../structures/command'
|
||||||
import { RunOptions } from '../types/commandTypes'
|
import { RunOptions } from '../types/commandTypes'
|
||||||
import { configureServer, explainRoles, installation, loginInfo, useSyncgroup } from './mitgucken'
|
import { configureServer, explainRole, installation, loginInfo, useSyncgroup } from './mitgucken'
|
||||||
|
|
||||||
export default new Command({
|
export default new Command({
|
||||||
name: 'guides',
|
name: 'guides',
|
||||||
@ -70,7 +70,7 @@ export default new Command({
|
|||||||
userDMChannel.send({ embeds: useSyncgroup(), files: [overview, joingroup, resume, leavegroup] })
|
userDMChannel.send({ embeds: useSyncgroup(), files: [overview, joingroup, resume, leavegroup] })
|
||||||
} else if (guideSelection.customId === 'explainRoles') {
|
} else if (guideSelection.customId === 'explainRoles') {
|
||||||
const userDMChannel = await guideSelection.user.createDM()
|
const userDMChannel = await guideSelection.user.createDM()
|
||||||
userDMChannel.send(explainRoles())
|
userDMChannel.send({ embeds: explainRole() })
|
||||||
}
|
}
|
||||||
|
|
||||||
guideSelection.update({ content: "Hab ich dir per DM geschickt :)", components: [] })
|
guideSelection.update({ content: "Hab ich dir per DM geschickt :)", components: [] })
|
||||||
|
@ -16,13 +16,9 @@ export default new Command({
|
|||||||
const embedList: APIEmbed[] = []
|
const embedList: APIEmbed[] = []
|
||||||
embedList.push(...installation())
|
embedList.push(...installation())
|
||||||
embedList.push(...configureServer())
|
embedList.push(...configureServer())
|
||||||
|
embedList.push(...explainRole())
|
||||||
embedList.push(...loginInfo())
|
embedList.push(...loginInfo())
|
||||||
embedList.push(...useSyncgroup())
|
embedList.push(...useSyncgroup())
|
||||||
embedList.push({
|
|
||||||
color,
|
|
||||||
title: "Wie du an einen Account kommst",
|
|
||||||
description: explainRoles()
|
|
||||||
})
|
|
||||||
|
|
||||||
//logger.info(`Trying to use ${splashScreen.name}`, { requestId, guildId: interaction.interaction.guild?.id })
|
//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 })
|
logger.info(`Sending guide to ${interaction.interaction.user.id}`, { requestId, guildId: interaction.interaction.guild?.id })
|
||||||
@ -32,6 +28,13 @@ export default new Command({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
export function explainRole(): APIEmbed[] {
|
||||||
|
return [{
|
||||||
|
color,
|
||||||
|
title: "Wie du an einen Account kommst",
|
||||||
|
description: roleExplanation
|
||||||
|
}]
|
||||||
|
}
|
||||||
export function installation(): APIEmbed[] {
|
export function installation(): APIEmbed[] {
|
||||||
const embedList: APIEmbed[] = []
|
const embedList: APIEmbed[] = []
|
||||||
// DownloadLink and installation
|
// DownloadLink and installation
|
||||||
@ -67,7 +70,7 @@ export function configureServer(): APIEmbed[] {
|
|||||||
title: "Server Verbindung",
|
title: "Server Verbindung",
|
||||||
description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her",
|
description: "Stelle eine Verbindung zum Hartzarett Jellyfin Server her",
|
||||||
fields: [
|
fields: [
|
||||||
{ name: "Server Adresse", value: "https://media.hartzarett.ruhr" }
|
{ name: "Server Adresse", value: "`https://media.hartzarett.ruhr`" }
|
||||||
],
|
],
|
||||||
image: {
|
image: {
|
||||||
url: 'attachment://server_verbindung.png'
|
url: 'attachment://server_verbindung.png'
|
||||||
@ -91,7 +94,7 @@ export function loginInfo(): APIEmbed[] {
|
|||||||
embedList.push({
|
embedList.push({
|
||||||
color,
|
color,
|
||||||
title: "Login",
|
title: "Login",
|
||||||
description: "Melde dich mit dem Usernamen und Passwort an, welches dir von mir zugeschickt wird. Falls du ein neues brauchst führe einmal /reset_passwort aus :)",
|
description: "Melde dich mit dem Usernamen und Passwort an, welches dir von mir zugeschickt wird. Falls du ein neues brauchst führe einmal `/passwort_reset` aus :)",
|
||||||
image: {
|
image: {
|
||||||
url: 'attachment://login_screen.png'
|
url: 'attachment://login_screen.png'
|
||||||
}
|
}
|
||||||
@ -139,8 +142,7 @@ export function useSyncgroup(): APIEmbed[] {
|
|||||||
return embedList
|
return embedList
|
||||||
}
|
}
|
||||||
|
|
||||||
export function explainRoles(): string {
|
const roleExplanation = `Mit einer Rolle kann dafür gesorgt werden, dass du einen dauerhaften Account auf dem Mediaserver hast. Wende dich bei Bedarf an Samantha oder Markus.\n
|
||||||
return `Mit einer Rolle kann dafür gesorgt werden, dass du einen dauerhaften Account auf dem Mediaserver hast. Wende dich bei Bedarf an Samantha oder Markus.\n
|
|
||||||
Für eine watchparty bekommst du allerdings automatisch einen Account. Hierfür melde einfach Interesse an dem Event an. Wenn du für das Event Interesse angemeldet hast bekommst du automatisch beim Start des Events einen Benutzernamen und das dazugehörige Passwort zugesendet.\n
|
Für eine watchparty bekommst du allerdings automatisch einen Account. Hierfür melde einfach Interesse an dem Event an. Wenn du für das Event Interesse angemeldet hast bekommst du automatisch beim Start des Events einen Benutzernamen und das dazugehörige Passwort zugesendet.\n
|
||||||
Hast du kein Interesse angemeldet bekommst du automatisch einen Nutzernamen und Passwort zugeschickt wenn du den Channel betrittst in dem das Event stattfindet.`
|
Hast du kein Interesse angemeldet bekommst du automatisch einen Nutzernamen und Passwort zugeschickt wenn du den Channel betrittst in dem das Event stattfindet.`
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user