how to get this typa button

No description
8 Replies
d.js toolkit
d.js toolkit5d ago
- 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!
Auth
Auth5d ago
also lil doubt can you gimme the docs for the event
client.on("threadCreate", async (thread) => {
if (thread.parentId === '1068808327716405329') { // Ensure ID is a string
try {
await thread.send('Hello!');
console.log('Sent "hello" to the new thread.');
} catch (error) {
console.error('Failed to send message to the new thread:', error);
}
}
});
client.on("threadCreate", async (thread) => {
if (thread.parentId === '1068808327716405329') { // Ensure ID is a string
try {
await thread.send('Hello!');
console.log('Sent "hello" to the new thread.');
} catch (error) {
console.error('Failed to send message to the new thread:', error);
}
}
});
like threadcreate
space
space5d ago
I'm not sure I understand. If you want to know how to send such a (or rather any) button, you can refer to this: https://discordjs.guide/message-components/buttons.html
Auth
Auth5d ago
how can i integrate this button in normal messages? like if i aint using slash commands
space
space5d ago
It's the same
Auth
Auth5d ago
HOW IN THIS
const message = await thread.send('nyaaa');
const message = await thread.send('nyaaa');
d.js docs
d.js docs5d ago
:method: ThreadChannel#send() @14.16.2 Sends a message to this channel.
// Send a basic message
channel.send('hello!')
.then(message => console.log(`Sent message: ${message.content}`))
.catch(console.error);
// Send a basic message
channel.send('hello!')
.then(message => console.log(`Sent message: ${message.content}`))
.catch(console.error);
Want results from more Discord servers?
Add your server