The bot is silent and does not send me a transcript
Code:
(This is my first time working with discord.js, don’t judge me)
24 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!Not all users are cached, fetch instead, and cath the rejection
How is that? Could you show it? I'm generally 0 in discord.js, I've already suffered with this skin for 10 years
<Client>.users.fetch(), returns a primise
if anything, at the very bottom is the code for sending the file to me in private messages, I asked the AI to generate it so that the TF would have an idea of what it is
How can I make the bot send me the transcript it creates via PM?
yeah dont ask ai
To send a file pass it in in
files:[]
when sending the messageyes that's understandable
How can I get him to DM me?
ask him
or do you mean the bot?
Then fetch the user
Bot
As they arent always cached
And its cache
Not cashe
But that should error
So that code either isnt running or you're ignoring your errors
can you give an example? I don’t understand anything from your words, I’m writing in a different language altogether, I just needed discord.js😔
<Client>.users.fetch(id), returns a promise, call .send on the result
Additionally, I don’t know English well and use a translator😬
like this?
no
That returns a promise
You never define call either
Nor do anything with the fetch result
This is basic js at this point
That channel getting is also invalid
I suggest you learn js first, #rules 3 #resources
this is different, this is already aoi.js
No
Thats basic js
And invalid syntax
Not to mention that snowflakes are strings
I changed the code a little, can you tell me what's wrong here?
you arent fetching
a'd again even then
Cache is spelled wrong
which is correct? bro, I understand that I’ve already pissed you off, but because of the very crooked Google translator, I can’t understand what you meant
Google translator actually translated this message as “you’re not attractive”
...cache.get()
just accesses local data
<Client>.users.cache
won't necessarily contain the given User
therefore, it's better to use <Client>.users.fetch()
in order to query the API if your local data doesn't have the userGot it, thanks, I'll check it right now
I'll post the code right now
given that you aren't calling
<Channel>.isTextBased()
anywhere, I'd assume this is more an issue with one of the third-party libraries you're using, such as aoi.js
or discord-html-transcripts
we will not be able to provide support for these
there was a known internal issue that was previously fixed that featured this error, but it was related to how interactions are handled
you don't appear to be using interactions anywhere in this code
regardless of whether you decide to attempt to fix this on your own or ask for support elsewhere, you will likely want to properly log your errors so that you can see the error's stack trace