Im dumb as fuck
This commit is contained in:
parent
70e3494f69
commit
aba356a0c3
3
index.js
3
index.js
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue