Rename !info to !user/!userinfo
This commit is contained in:
parent
e8ff297368
commit
7ad2458fd9
3 changed files with 10 additions and 7 deletions
|
@ -1,28 +0,0 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { getUserInfoEmbed } from "../functions/getUserInfoEmbed";
|
||||
import { sendErrorMessage } from "../../../pluginUtils";
|
||||
|
||||
export const InfoCmd = utilityCmd({
|
||||
trigger: "info",
|
||||
description: "Show basic information about a user",
|
||||
usage: "!info 106391128718245888",
|
||||
permission: "can_info",
|
||||
|
||||
signature: {
|
||||
user: ct.resolvedUserLoose({ required: false }),
|
||||
|
||||
compact: ct.switchOption({ shortcut: "c" }),
|
||||
},
|
||||
|
||||
async run({ message, args, pluginData }) {
|
||||
const userId = args.user?.id || message.author.id;
|
||||
const embed = await getUserInfoEmbed(pluginData, userId, args.compact);
|
||||
if (!embed) {
|
||||
sendErrorMessage(pluginData, message.channel, "User not found");
|
||||
return;
|
||||
}
|
||||
|
||||
message.channel.createMessage({ embed });
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue