mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 05:52:05 +00: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:
parent
ca75eb509a
commit
e5264aba37
1 changed files with 6 additions and 1 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Reference in a new issue