#How do I fetch an emoji?

16 messages · Page 1 of 1 (latest)

dry inlet
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

oblique storm
#

How do I fetch an emoji? Discord.js 13.0.0

empty eagle
#

Wdym by "later"?

oblique storm
#

later in the code

#

I moved it since i made the post and it's right below where it gets defined now

haughty plover
#

Since you use require to get the client import into this file theres a good chance the client isnt logged in and its caches are empty

oblique storm
#

So what should I use instead of require

haughty plover
#

One way is to export the listener function and bind the events in your main file, the way our event handler does it

untold onyxBOT
haughty plover
#

Or, just access client inside the event, where its cached and ready

oblique storm
#

But I can't access it in the event because the event uses client.on

haughty plover
#

reaction.client exists

#

Your client is attached to most discord.js objects

oblique storm
#

But I'd have to put reaction.client inside the code that begins with client.on wouldn't I?

oblique storm
#

How do I fetch an emoji?