diff --git a/index.js b/index.js index 2780f84..e8fd454 100644 --- a/index.js +++ b/index.js @@ -106,7 +106,6 @@ client.on('inviteCreate', (invite) => { //if someone creates an invite while bot return; } if (!row) return; - console.log(row) if(!row.log_create) return; client.channels.fetch(row.channel).then(channel => { if (!channel) return; // They probably set perms wrong @@ -130,7 +129,7 @@ client.on('inviteCreate', (invite) => { //if someone creates an invite while bot }, { name: "Inviter", - value: `${(invite.inviter.id == client.user.id) ? "Custom Invite URL (Through Bot/Embed)" : `${invite.inviter} (${invite.inviter.displayName})`}` + value: `${invite.inviter?.id ?`${invite.inviter} (${invite.inviter.displayName})` : "Custom Invite URL (Through Bot/Embed)"}` } ] }] @@ -166,7 +165,7 @@ client.on('guildMemberAdd', async (member) => { // We're just gonna always send }, { name: "Invite", - value: `Inviter: ${(invite.inviter.id == client.user.id) ? "Custom Invite URL (Through Bot/Embed)" : `${invite.inviter} (${invite.inviter.displayName})`}\nCode: ${invite.code}\nUses: ${invite.uses}/${invite.maxUses ||"∞"}\nExpires: ${invite.expiresAt <= 0 ? "Never" : ``}\nCreated at: ` + value: `Inviter: ${invite.inviter?.id ? `${invite.inviter} (${invite.inviter.displayName})` : "Custom Invite URL (Through Bot/Embed)"}\nCode: ${invite.code}\nUses: ${invite.uses}/${invite.maxUses ||"∞"}\nExpires: ${invite.expiresAt <= 0 ? "Never" : ``}\nCreated at: ` }, { name: "Guild", @@ -253,7 +252,6 @@ client.on('interactionCreate', async interaction => { } log_create = interaction.options.getBoolean('log_create'); if (log_create == null) log_create = true; - console.log(log_create) const channel = interaction.options.getChannel('channel').id; db.run(`INSERT OR REPLACE INTO guilds (id, channel, log_create) VALUES (?, ?, ?)`, [interaction.guild.id.toString(), channel.toString(), log_create], (err) => { if (err) {