mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 16:25:03 +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 }) {
|
||||
const roleId = args.role?.id;
|
||||
const role = roleId && pluginData.guild.roles.get(roleId);
|
||||
if (!role) {
|
||||
if (!args.role) {
|
||||
sendErrorMessage(pluginData, message.channel, "Role not found");
|
||||
return;
|
||||
}
|
||||
|
||||
const embed = await getRoleInfoEmbed(pluginData, role, message.author.id);
|
||||
const embed = await getRoleInfoEmbed(pluginData, args.role, message.author.id);
|
||||
|
||||
message.channel.createMessage({ embed });
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue