#How to make bot message delete?
44 messages · Page 1 of 1 (latest)
you do exactly that, but ensure message is the bots message
if you're using <TextChannel>.send() or similar, it returns a promise with the sent message
resolve it and call .delete() on it
message.delete deletes player message that fired command
message.delete() deletes the message in the message variable
seems like in your case it is the "players" message
this is message that bot sends and i want to make it delete after 2 seconds message.channel.send(`${message.member} Have been successfully verified`)
also, how come you're using v13 and v14?
im afraid that version does not exist
so you're using 12.5.3
which is not supported
i tried other versions but the other versiosn doesnt support express (24/7 thing)
that has nothing to do with discord.js
then why it does work only in 12.5.3 and when i do 13 or 14 it does not work
that's incredibly vague
either way, you should update to v13, and then to v14, or both at the same time
so 12.5.3 cant delete his self message?
doesn't matter, as it is not supported
Read the update docs
Also you need to update node, v12 is really old. You need v16.9 for djs iirc
you need 16.9 for discord.js v14
alr
Hey almeida you still online and possible to help me?
is it still the same issue?
but the bot doesnt start then
Do i have my code good?
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'ping') {
await interaction.reply('Pong!');
}
});
client.login('HIDDEN');
you should create a new thread, or use #djs-help-v14