I'm trying to make my Bot react with a custom emote to every message a specific user sends.
My code currently is :
if (msg.content.startsWith("")) {
msg.react(msg.guild.emojis.get("475766563719479296"))
}
Even though I checked everything, I still get this error :
(node:13640) UnhandledPromiseRejectionWarning: TypeError: Emoji must be a string or Emoji/ReactionEmoji
at Message.react (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_modulesdiscord.jssrcstructuresMessage.js:437:23)
at Client.client.on (C:UsersLarsDocumentsBotsSupport Bot [Resanance]index.js:40:17)
at Client.emit (events.js:182:13)
at MessageCreateHandler.handle (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_modulesdiscord.jssrcclientwebsocketpacketshandlersMessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_modulesdiscord.jssrcclientwebsocketpacketsWebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_modulesdiscord.jssrcclientwebsocketWebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_modulesdiscord.jssrcclientwebsocketWebSocketConnection.js:296:17)
at WebSocket.onMessage (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_moduleswslibevent-target.js:120:16)
at WebSocket.emit (events.js:182:13)
at Receiver._receiver.onmessage (C:UsersLarsDocumentsBotsSupport Bot [Resanance]
ode_moduleswslibwebsocket.js:137:47)
I don't know what could be wrong.
Could someone help me?
Edit:
I did try msg.react("475766563719479296")
but it's just the Error unknown emoji.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…