mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(GuildMemberRolesManager): type error should mention Role an… (#3931)
* fix(GuildMemberRoleManager): type error should mention that Role or Snowflake are fine too * fix(GuildMemberRoleManager): comma instead of 'or' * style: break long line
This commit is contained in:
@@ -90,7 +90,12 @@ class GuildMemberRoleManager {
|
||||
} else {
|
||||
roleOrRoles = this.guild.roles.resolve(roleOrRoles);
|
||||
if (roleOrRoles === null) {
|
||||
throw new TypeError('INVALID_TYPE', 'roles', 'Array or Collection of Roles or Snowflakes', true);
|
||||
throw new TypeError(
|
||||
'INVALID_TYPE',
|
||||
'roles',
|
||||
'Role, Snowflake or Array or Collection of Roles or Snowflakes',
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
await this.client.api.guilds[this.guild.id].members[this.member.id].roles[roleOrRoles.id].put({ reason });
|
||||
|
||||
Reference in New Issue
Block a user