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
|
// Handle invite creation
|
||||||
client.on('inviteCreate', (invite) => { //if someone creates an invite while bot is running, update store
|
client.on('inviteCreate', (invite) => { //if someone creates an invite while bot is running, update store
|
||||||
client.invites[invite.code] = invite.uses
|
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`
|
// 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) => {
|
db.get(`SELECT * FROM guilds WHERE id = ?`, [invite.guild.id], async (err, row) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(row)
|
|
||||||
if (!row) return;
|
if (!row) return;
|
||||||
console.log(row.channel)
|
|
||||||
client.channels.fetch(row.channel).then(channel => {
|
client.channels.fetch(row.channel).then(channel => {
|
||||||
console.log(channel.name)
|
|
||||||
if (!channel) return; // They probably set perms wrong
|
if (!channel) return; // They probably set perms wrong
|
||||||
channel.send({
|
channel.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
|
@ -241,7 +237,6 @@ client.on('interactionCreate', async interaction => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const channel = interaction.options.getChannel('channel').id;
|
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) => {
|
db.run(`INSERT OR REPLACE INTO guilds (id, channel) VALUES (?, ?)`, [interaction.guild.id.toString(), channel.toString()], (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
Loading…
Reference in a new issue