fix(Invite): fix valueOf returning undefined (#3582)

* Update Invite.js

* Fix typings

* Fix ESLint errors
This commit is contained in:
Gryffon Bellish
2019-11-19 15:54:35 -05:00
committed by SpaceEEC
parent 1bcc0c2e1d
commit d39f17925d
2 changed files with 5 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ class Invite extends Base {
guild: 'guildID',
});
}
valueOf() {
return this.code;
}
}
module.exports = Invite;

1
typings/index.d.ts vendored
View File

@@ -878,6 +878,7 @@ declare module 'discord.js' {
public setNickname(nickname: string, reason?: string): Promise<GuildMember>;
public toJSON(): object;
public toString(): string;
public valueOf(): string;
}
export class Integration extends Base {