Im dumb as fuck

This commit is contained in:
Christopher Cookman 2024-08-18 01:23:42 -06:00
parent 70e3494f69
commit aba356a0c3
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -468,6 +468,9 @@ client.on("interactionCreate", async (interaction) => {
if (row) { if (row) {
return interaction.reply({ content: "Those accounts are already linked.", ephemeral: true }); return interaction.reply({ content: "Those accounts are already linked.", ephemeral: true });
} else { } else {
if (accountNumberFrom == accountNumberTo) {
return interaction.reply({ content: "You can't link an account to itself.", ephemeral: true });
}
db.run("INSERT INTO links (linked_from, linked_to, discord_id) VALUES (?, ?, ?)", accountNumberFrom, accountNumberTo, interaction.user.id, (err) => { db.run("INSERT INTO links (linked_from, linked_to, discord_id) VALUES (?, ?, ?)", accountNumberFrom, accountNumberTo, interaction.user.id, (err) => {
if (err) { if (err) {
console.error(err); console.error(err);