From 11dac10a079a7c508976c1b1fbabcedbe1d1d8f8 Mon Sep 17 00:00:00 2001 From: Sammy Date: Sun, 4 Jun 2023 03:10:33 +0200 Subject: [PATCH] Added handler for password reset command --- server/commands/resetPassword.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server/commands/resetPassword.ts diff --git a/server/commands/resetPassword.ts b/server/commands/resetPassword.ts new file mode 100644 index 0000000..479e819 --- /dev/null +++ b/server/commands/resetPassword.ts @@ -0,0 +1,17 @@ +import { ApplicationCommandOptionType, BurstHandlerMajorIdKey } from 'discord.js' +import { Command } from '../structures/command' +import { RunOptions } from '../types/commandTypes' +import { jellyfinHandler } from "../.." +import { v4 as uuid } from 'uuid' + +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) => { + console.log('PasswortReset called') + interaction.interaction.followUp('Yo, ich schick dir eins!') + console.log(JSON.stringify(interaction.interaction.member, null, 2)) + jellyfinHandler.resetUserPasswort(interaction.interaction.member, uuid()) + } +})