Compare commits

..

No commits in common. "974d01a08f39895b723fd08e30786b95ce3e23ec" and "04fad613b6826ed52ebe23ffe54fe152f014ca66" have entirely different histories.

View File

@ -20,27 +20,6 @@ const client = new Client({
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
console.log(`Deleting old messages from this bot in command channel: ${COMMAND_CHANNEL_ID}...`);
let channel = client.channels.cache.get(COMMAND_CHANNEL_ID);
if (!channel) return console.error("(ready) Can't find command channel");
channel.messages.fetch({ limit: 100 }).then(messages => {
messages.forEach(message => {
if (message.author.id === client.user.id) {
message.delete();
}
});
}).catch(console.error);
});
// send message on error
client.on("error", (error) => {
console.error(error);
let channel = client.channels.cache.get(COMMAND_CHANNEL_ID);
if (!channel) return console.error("Can't find command channel");
client.channels.cache
.get(COMMAND_CHANNEL_ID)
.send(`error: ${error.message}`)
.catch(console.error);
});
client.on("interactionCreate", async (interaction) => {