Remove unused logs
This commit is contained in:
parent
932993c048
commit
ae85edb0c9
5
index.js
5
index.js
|
@ -86,18 +86,14 @@ client.on('ready', async () => {
|
|||
// Handle invite creation
|
||||
client.on('inviteCreate', (invite) => { //if someone creates an invite while bot is running, update store
|
||||
client.invites[invite.code] = invite.uses
|
||||
console.log(`Invite created: ${invite.code}`);
|
||||
// Check the db for the channel to log to, guild id is column `id` in table `guilds`, channel id is column `channel`
|
||||
db.get(`SELECT * FROM guilds WHERE id = ?`, [invite.guild.id], async (err, row) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
console.log(row)
|
||||
if (!row) return;
|
||||
console.log(row.channel)
|
||||
client.channels.fetch(row.channel).then(channel => {
|
||||
console.log(channel.name)
|
||||
if (!channel) return; // They probably set perms wrong
|
||||
channel.send({
|
||||
embeds: [{
|
||||
|
@ -241,7 +237,6 @@ client.on('interactionCreate', async interaction => {
|
|||
return;
|
||||
}
|
||||
const channel = interaction.options.getChannel('channel').id;
|
||||
console.log(channel)
|
||||
db.run(`INSERT OR REPLACE INTO guilds (id, channel) VALUES (?, ?)`, [interaction.guild.id.toString(), channel.toString()], (err) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
|
|
Loading…
Reference in a new issue