#Bump Command on Bot.

64 messages · Page 1 of 1 (latest)

sinful anchorBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • 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
prisma lake
#

#how-to-get-help

#

then read it

winter gazelle
#

channel.send('content')

prisma lake
#

we will never help you with writing code, but we can help you with fixing

winter gazelle
#

all users here are annoying, you should try to help

winter gazelle
#

ejecuted?

prisma lake
#

i dont think its possible to see who executed the command

steel cape
#

Again, we are here to provide help if you have issues

#

We're not writing code for you

prisma lake
#

help you with what?

winter gazelle
prisma lake
#

We're not writing code for you

steel cape
#

Try it yourself first. The guide and the docs will help you a lot

fathom boughBOT
winter gazelle
#
discord.js

discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.

winter gazelle
#

i thinnk

prisma lake
#

not the guide

#

have you read it?

winter gazelle
prisma lake
#

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?

steel cape
#

The guide has everything you need

#

Read it

fathom boughBOT
#
const channel = client.channels.cache.get("222086648706498562");
const channel = guild.channels.cache.find(channel => channel.name === "general");
steel cape
#

thats how you'd send a message to a specific channel

prisma lake
#

what invite and info

steel cape
#

also, send a single message

prisma lake
#

you'd have to do that yourself

#

that's your job

fathom boughBOT
steel cape
#

read. The. Docs

prisma lake
#

<TextChannel>.send('info and invite link goes here')

steel cape
#

We arent the docs

#

Put some effort in yourself and search the docs

prisma lake
#

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

opal shard
#

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

steel cape
#

you dont have to send a message for every word

#

and actually send the error

fathom boughBOT
#
  • ReferenceError: "x" is not defined: learn more
  • TypeError: Cannot read properties of undefined/null (reading "x"): learn more
steel cape
#

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