chatsounds: surely i wont regret this

This commit is contained in:
Cynthia Foxwell 2025-02-05 22:26:37 -07:00
parent 0e18c2e52f
commit 285b99ced8
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -1,4 +1,7 @@
const Command = require("#lib/command.js");
const InteractionCommand = require("#lib/interactionCommand.js");
const {ApplicationCommandOptionTypes} = require("#util/dconstants.js");
const {default: Chatsounds, defaultModifiers} = require("sh");
const sh = new Chatsounds({modifiers: defaultModifiers, gitHubToken: hf.apikeys.github});
@ -42,3 +45,19 @@ chatsounds.callback = async function (msg, line) {
};
};
hf.registerCommand(chatsounds);
const chatsoundsInteraction = new InteractionCommand("chatsounds");
chatsoundsInteraction.helpText = "Garry's Mod chatsounds as a file output";
chatsoundsInteraction.options.input = {
name: "input",
type: ApplicationCommandOptionTypes.STRING,
description: "Chatsounds to parse",
required: true,
default: "",
};
chatsoundsInteraction.callback = async function (interaction) {
const input = this.getOption(interaction, "input");
return chatsounds.callback(interaction, input);
};
hf.registerCommand(chatsoundsInteraction);