mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Errors Standardization (#1246)
* errors and stuff * more errors * all the errors * fix build
This commit is contained in:
@@ -7,6 +7,7 @@ const Util = require('../util/Util');
|
||||
const Collection = require('../util/Collection');
|
||||
const Constants = require('../util/Constants');
|
||||
const Permissions = require('../util/Permissions');
|
||||
const { TypeError } = require('../errors');
|
||||
let GuildMember;
|
||||
|
||||
/**
|
||||
@@ -428,7 +429,7 @@ class Message {
|
||||
*/
|
||||
react(emoji) {
|
||||
emoji = this.client.resolver.resolveEmojiIdentifier(emoji);
|
||||
if (!emoji) throw new TypeError('Emoji must be a string or Emoji/ReactionEmoji');
|
||||
if (!emoji) throw new TypeError('EMOJI_TYPE');
|
||||
|
||||
return this.client.api.channels(this.channel.id).messages(this.id).reactions(emoji)['@me']
|
||||
.put()
|
||||
|
||||
Reference in New Issue
Block a user