Rename !info to !user/!userinfo

This commit is contained in:
Dragory 2020-08-06 00:48:29 +03:00
parent e8ff297368
commit 7ad2458fd9
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
3 changed files with 10 additions and 7 deletions

View file

@ -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 });
},
});