Compare commits
2 commits
cfd6664ea8
...
4735cce106
Author | SHA1 | Date | |
---|---|---|---|
4735cce106 | |||
e280d90053 |
1 changed files with 21 additions and 1 deletions
|
@ -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.";
|
||||||
|
@ -1981,7 +1997,11 @@ guildinfo.callback = async function (msg, line) {
|
||||||
if (!line || line == "") {
|
if (!line || line == "") {
|
||||||
if (!msg.guildID) return "Not in a guild.";
|
if (!msg.guildID) return "Not in a guild.";
|
||||||
const __guild = msg.channel.guild ?? hf.bot.guilds.get(msg.guildID);
|
const __guild = msg.channel.guild ?? hf.bot.guilds.get(msg.guildID);
|
||||||
if (__guild) _guild = {source: "local", data: __guild};
|
if (__guild) {
|
||||||
|
_guild = {source: "local", data: __guild};
|
||||||
|
} else {
|
||||||
|
_guild = await getGuild(msg.guildID);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!SNOWFLAKE_REGEX.test(line)) return "Not a snowflake.";
|
if (!SNOWFLAKE_REGEX.test(line)) return "Not a snowflake.";
|
||||||
const snowflake = line.match(SNOWFLAKE_REGEX)[1];
|
const snowflake = line.match(SNOWFLAKE_REGEX)[1];
|
||||||
|
|
Loading…
Reference in a new issue