mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 00:35:02 +00:00
simplified RoleInfoCmd
This commit is contained in:
parent
6d344474d3
commit
ab569e7c92
1 changed files with 2 additions and 4 deletions
|
@ -14,14 +14,12 @@ export const RoleInfoCmd = utilityCmd({
|
||||||
},
|
},
|
||||||
|
|
||||||
async run({ message, args, pluginData }) {
|
async run({ message, args, pluginData }) {
|
||||||
const roleId = args.role?.id;
|
if (!args.role) {
|
||||||
const role = roleId && pluginData.guild.roles.get(roleId);
|
|
||||||
if (!role) {
|
|
||||||
sendErrorMessage(pluginData, message.channel, "Role not found");
|
sendErrorMessage(pluginData, message.channel, "Role not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed = await getRoleInfoEmbed(pluginData, role, message.author.id);
|
const embed = await getRoleInfoEmbed(pluginData, args.role, message.author.id);
|
||||||
|
|
||||||
message.channel.createMessage({ embed });
|
message.channel.createMessage({ embed });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue