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)
(This is my first time working with discord.js, don’t judge me)
$djsEval[(async () => {
const discordTranscripts = require("discord-html-transcripts");
const userID = '602842619797569587';
const channel = client.channels.cache.get("$channelID");
const attachment = await discordTranscripts.createTranscript(channel, {
filename: "transcript.html",
saveImages: true,
poweredBy: false,
number: message.content
});
client.users.cashe.get(userID).send({
files: [attachment]
});
})();false]npm list discord.js and node node -v version?files:[] when sending the message...cache.get() just accesses local data<Client>.users.cache won't necessarily contain the given User<Client>.users.fetch() in order to query the API if your local data doesn't have the user
<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$djsEval[(async () => {
const discordTranscripts = require("discord-html-transcripts");
const channel = client.channels.cache.get("$channelID");
const attachment = await discordTranscripts.createTranscript(channel, {
filename: "transcript.html",
saveImages: true,
poweredBy: false,
number: message.content
});
client.users.fetch(602842619797569587);
call.send({
files: [attachment]
});
})();false]$djsEval[(async () => {
const discordTranscripts = require("discord-html-transcripts");
const userId = '602842619797569587';
const user = client.users.cashe.get(userId);
const channel = message.channel.id;
const attachment = await discordTranscripts.createTranscript(channel, {
filename: "transcript.html",
saveImages: true,
poweredBy: false,
number: message.content
});
user.send({
files: [attachment]
});
})();false]$djsEval[(async () => {
const discordTranscripts = require("discord-html-transcripts");
const userId = '602842619797569587';
const user = client.users.fetch(userId);
const channel = message.channel.id;
const attachment = await discordTranscripts.createTranscript(channel, {
filename: "transcript.html",
saveImages: true,
poweredBy: false,
number: message.content
});
user.send({
files: [attachment]
});
})();false]