const Discord = require("discord.js");
const client = new Discord.Client();
const prefix = "!";
client.on("ready", () => {
console.log("I am ready!");
client.user.setPresence( {
status: "online",
game: {
name: "MyBOT",
type: "PLAYING"
}
});
});
const fetchedMessages = await msg.channel.fetchMessages();
const amount = 50
client.on("message", msg => {
if (message.content.toLowerCase().startsWith(prefix + "clearchat")) {
client.on('message', message => {
if (message.reply('!say')) {
for (let i = 0; i < amount; i++) {
await fetchedMessages[i].delete()
await msg.channel.bulkDelete(AMOUNT)
}};
});
const token = ("my token");
client.login(token);
您能告诉我如何实现吗?是用于删除消息的自定义漫游器
而且先声不起作用,我不知道他们为什么可以在这两件事上帮助我?我是初学者