Answer the question
In order to leave comments, you need to log in
How to remove information about the server from the database if the bot was kicked/banned by DISCORD.JS?
Good evening, you need to find a solution on how to make a scheme, if the bot is kicked from the server or banned, it deleted information about this server from the database.
What the code for getting the server looks like:
global.Guild = require("./data/Guild.js");
bot.on("guildCreate", async (guild) => {
... Здесь создание канала
Guild.create({
chID: guild.channels.cache.find(ch => ch.name == 'music').id, // ID канала
gID: guild.id // ID сервера
})
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question