Hosfad
Hosfad
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
Alright i setup a new project with latest discordjs and it works now, i guess its time to update, thank you 🙂 @gwapes
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
ill update ill let you know
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
alright thanks buddy
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
Ughh thats a bummer
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
ahh never mind its actually throwing an error now :
TypeError: isJSONEncodable is not a function
at /home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/MessagePayload.js:202:9
at Array.map (<anonymous>)
at MessagePayload.resolveBody (/home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/MessagePayload.js:201:36)
at TextChannel.send (/home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:61)
at Task._execution (/home/hosfad/Desktop/SideProjects/07rates-bot/src/index.ts:69:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
TypeError: isJSONEncodable is not a function
at /home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/MessagePayload.js:202:9
at Array.map (<anonymous>)
at MessagePayload.resolveBody (/home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/MessagePayload.js:201:36)
at TextChannel.send (/home/hosfad/Desktop/SideProjects/07rates-bot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:61)
at Task._execution (/home/hosfad/Desktop/SideProjects/07rates-bot/src/index.ts:69:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
thanks for the help
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
i guess ill setup a new project with the latest discordjs and if that works ill update to latest
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
Yeah i tried 😦 , it doesnt throw any error
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
No description
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
Added the rate limit event just before i add my listeners
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
No description
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
not getting rate limited
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
Yes sir, it doesnt log from the rest.on
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
// this works and sends the message
console.log("before sending message"); // prints
await channel.send({ content: "message" });
console.log("sent message"); // prints

//embed
const embed = new EmbedBuilder()
.setDescription(`**Message:**`)
.setTitle("Review");

console.log("before sending embed"); // prints
// this doesnt work (gets stuck on the await and never prints)
await channel.send({ content: "message", embeds: [embed] });
console.log("embed message sent"); // doesnt print
// this works and sends the message
console.log("before sending message"); // prints
await channel.send({ content: "message" });
console.log("sent message"); // prints

//embed
const embed = new EmbedBuilder()
.setDescription(`**Message:**`)
.setTitle("Review");

console.log("before sending embed"); // prints
// this doesnt work (gets stuck on the await and never prints)
await channel.send({ content: "message", embeds: [embed] });
console.log("embed message sent"); // doesnt print
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
I did, pretty much everything before i try to send an embed works but everything after i try to send and embed doesnt
27 replies
DIAdiscord.js - Imagine an app
Created by Hosfad on 5/30/2024 in #djs-questions
TextChannel.send only works when sending raw content
1- yeah im working on updating to the latest version 2- its not getting rate limited, nor am i getting any errors in the console. 3- No it just seems to get stuck on that event but the main thread continues to work fine
27 replies