diff --git a/backend/src/plugins/Utility/commands/RoleInfoCmd.ts b/backend/src/plugins/Utility/commands/RoleInfoCmd.ts index 2439a481..13c26802 100644 --- a/backend/src/plugins/Utility/commands/RoleInfoCmd.ts +++ b/backend/src/plugins/Utility/commands/RoleInfoCmd.ts @@ -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 }); },