“Hapus pesan Discord.js” Kode Jawaban

Perselisihan JS Hapus pesan setelah waktu

message.reply('Invalid command')
  .then(msg => {
                msg.delete({ timeout: 20000 /*time unitl delete in milliseconds*/});
            })
  .catch(/*Your Error handling if the Message isn't returned, sent, etc.*/);
Shinobi Nyaa

Hapus pesan Discord.js

message.delete()
Nervous Newt

Cara menghapus pesan dengan ID Discord.js -nya

// ASSUMPTIONS:
// channel: the channel you want the message to be sent in
// lastmsg: the id of the last poll message

channel.fetchMessage(lastmsg).then(msg => msg.delete());
Poor Pony

Perselisihan menghapus pesan

"create a variable called id"
var id
"then inside your client message statement change id ->  id = message.id"
client.on('message', message => {
  id = message.id
});
"inside your command type  message.fetch(id).then(msg => msg.delete());"
  if (message.content === !test)
      message.fetch(id).then(msg => msg.delete());      
}});
ItzNightmare

Jawaban yang mirip dengan “Hapus pesan Discord.js”

Pertanyaan yang mirip dengan “Hapus pesan Discord.js”

Lebih banyak jawaban terkait untuk “Hapus pesan Discord.js” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya