2023-06-15 21:56:15 +02:00
|
|
|
import { v4 as uuid } from 'uuid'
|
|
|
|
import { jellyfinHandler } from "../.."
|
2023-06-04 03:10:33 +02:00
|
|
|
import { Command } from '../structures/command'
|
|
|
|
import { RunOptions } from '../types/commandTypes'
|
2023-10-21 14:56:15 +02:00
|
|
|
import { logger } from '../logger'
|
2023-06-04 03:10:33 +02:00
|
|
|
|
|
|
|
export default new Command({
|
|
|
|
name: 'passwort_reset',
|
|
|
|
description: 'Ich vergebe dir ein neues Passwort und schicke es dir per DM zu. Kostet auch nix! Versprochen! 😉',
|
|
|
|
options: [],
|
|
|
|
run: async (interaction: RunOptions) => {
|
2023-10-21 14:56:15 +02:00
|
|
|
logger.info('PasswortReset called')
|
2023-06-04 03:10:33 +02:00
|
|
|
interaction.interaction.followUp('Yo, ich schick dir eins!')
|
2023-10-21 14:56:15 +02:00
|
|
|
logger.info(JSON.stringify(interaction.interaction.member, null, 2))
|
2023-06-04 03:10:33 +02:00
|
|
|
jellyfinHandler.resetUserPasswort(interaction.interaction.member, uuid())
|
|
|
|
}
|
|
|
|
})
|