utility: add inviteinfo interaction command

This commit is contained in:
Cynthia Foxwell 2024-05-18 23:15:34 -06:00
parent e280d90053
commit 4735cce106

View file

@ -1049,6 +1049,22 @@ lookupinvite.callback = async function (msg, line) {
}; };
hf.registerCommand(lookupinvite); hf.registerCommand(lookupinvite);
const inviteinfoInteraction = new InteractionCommand("inviteinfo");
inviteinfoInteraction.helpText = "Get information on an invite code";
inviteinfoInteraction.options.invite = {
name: "invite",
type: Constants.ApplicationCommandOptionTypes.STRING,
description: "Invite code to get info for",
required: true,
default: "",
};
inviteinfoInteraction.callback = async function (interaction) {
const invite = getOption(interaction, inviteinfoInteraction, "invite");
return lookupinvite.callback(interaction, invite);
};
hf.registerCommand(inviteinfoInteraction);
const snowflake = new Command("snowflake"); const snowflake = new Command("snowflake");
snowflake.category = CATEGORY; snowflake.category = CATEGORY;
snowflake.helpText = "Converts a snowflake ID into readable time."; snowflake.helpText = "Converts a snowflake ID into readable time.";