- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
#Bump Command on Bot.
64 messages · Page 1 of 1 (latest)
channel.send('content')
we will never help you with writing code, but we can help you with fixing
all users here are annoying, you should try to help
we don't need to do this, but we can direct the user on how to do it
ejecuted?
i dont think its possible to see who executed the command
☝🏿
sure but this person looks like he hasn't even tried
help you with what?
you're not sure about this, you shouldn't judge a person, but rather try to help them
We're not writing code for you
Try it yourself first. The guide and the docs will help you a lot
latest version
i thinnk
that's the docs
not the guide
have you read it?
this will help just as much
well that isn't helpful
you need to listen to messageCreate event
and make the code act according to the message sent
uhh so your bot has a /bump command and you want the bot to listen to the /bump command?
const channel = client.channels.cache.get("222086648706498562");
const channel = guild.channels.cache.find(channel => channel.name === "general");
- Caches in discord.js are Collections which extend the native Map structure.
- learn more
thats how you'd send a message to a specific channel
what invite and info
also, send a single message
TextChannel#createInvite()
Creates an invite to this guild channel.
read. The. Docs
<TextChannel>.send('info and invite link goes here')
we've already helped you with the d.js part, now it's entirely upto the logic of your code
which we won't help with here
What part do you struggle with here? Tell us what you did and what exactly you still need help with.
By putting it as a string in the send call. An invite is just a URL
Did you not try it? After being told several times to put in some work yourself? No need to ask if it works, just try it and see if it does what you expect it to do
ReferenceError: "x" is not defined: learn moreTypeError: Cannot read properties of undefined/null (reading "x"): learn more
You access invite but never define it
You only define it in the then callback
define the invite before that
this is basic js really
Or move your embed in your then callback
It is but ok, then move the embed into the then callback
the then callback
and that error is
thats not how a callback works
This is basic js
Do you have any js experience at all?
Then learn it, #rules 3 #resources
Home: What's new