#monitor_endpoints.js
1 messages · Page 1 of 1 (latest)
looks really strange..
try to search for message
@dark vale please send messages about this issue here:)

you are, but.. error says that message is not defined, isn't it?
correct
so I guess it isnt defined what channel to send it in, which is why the error occurs?
show FULL error again
doesnt matter, lets say a #general type channel. Private server
I can give a specific ID as well
1054470144442769539
would suggest to pass channel as argument to the checkIPIsOnline function
to get channel by id you can use <Client>.channels.cache.get(id)
even if its a static channel?
There isnt a user initiating a check here, the nodeJS script pings an IP and on status change will send a message
This is a bot for a single server, it will always post to the same channel
Something like this?
yeah
did you pass second argument to this function?
Yes
show
Both aren't right
it must be instance of BaseGuildTextChannel
which you can get using this^
let me give that a shot
Client#channels
All of the [BaseChannel](<https://discord.js.org/#/docs/discord.js/main/class/BaseChannel>)s that the client is currently handling, mapped by their ids - as long as sharding isn't being used, this will be every channel in every guild the bot is a member of. Note that DM channels will not be initially cached, and thus not be present in the Manager without their explicit fetching or use.
here is docs
Still not having luck. I'm passing the channel ID to the id argument in the command correct?
show how you do
is client ready?
Let me doubel check

you still passing string and not channel
2nd arg was us testing now, 1st arg works fine and checks fine, just cant send the message to a channel