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:
vzwGrey
2020-03-14 13:38:51 +01:00
committed by GitHub
parent ca75eb509a
commit e5264aba37

View File

@@ -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 });