Hello, I am looking for some support using Better-SQLite3 on Discord.js V14.
Here is the simple explenation.
This is how my table is laid out, within my DB - AM looking to fetch the inventory for a user, by their ID (3428572345742352798) in this case. I would like to to output 1x Nitro + 1x Nitro into a message on discord.
Like this
Here is my current code.
Here is the simple explenation.
This is how my table is laid out, within my DB - AM looking to fetch the inventory for a user, by their ID (3428572345742352798) in this case. I would like to to output 1x Nitro + 1x Nitro into a message on discord.
Like this
Here is my current code.
const target = interaction.member
const pull = await db.prepare('SELECT * FROM inventory WHERE userID=?').get(target.id)
if(!pull) {
const embed1 = new EmbedBuilder()
.setTitle(
.setDescription("All the information related to this user is strictly within the SeaShoreMC Server.")
.addFields(({name: "Item's", value:
.setColor("#009e47")
.setFooter({text: "SeashoreMC | PLAY.IP.HERE | MEMBERCOUNT"})
interaction.reply({embeds: [embed1]})
} else {
const embed = new EmbedBuilder()
.setTitle(
.setDescription("All the information related to this user is strictly within the SeaShoreMC Server.")
.addFields(({name: "Item's", value:
.setColor("#009e47")
.setFooter({text: "SeashoreMC | PLAY.IP.HERE | MEMBERCOUNT"})
interaction.reply({embeds: [embed]})
}
const pull = await db.prepare('SELECT * FROM inventory WHERE userID=?').get(target.id)
if(!pull) {
const embed1 = new EmbedBuilder()
.setTitle(
Items of ${interaction.member}).setDescription("All the information related to this user is strictly within the SeaShoreMC Server.")
.addFields(({name: "Item's", value:
You have no tiems.})).setColor("#009e47")
.setFooter({text: "SeashoreMC | PLAY.IP.HERE | MEMBERCOUNT"})
interaction.reply({embeds: [embed1]})
} else {
const embed = new EmbedBuilder()
.setTitle(
Level of ${target.username}).setDescription("All the information related to this user is strictly within the SeaShoreMC Server.")
.addFields(({name: "Item's", value:
ITEMSHERE})).setColor("#009e47")
.setFooter({text: "SeashoreMC | PLAY.IP.HERE | MEMBERCOUNT"})
interaction.reply({embeds: [embed]})
}
| UserID | Inventory |
| 3428572345742352798 | 1x Nitro |
| 234578237423842094820 | |
| 3428572345742352798 | 1x Nitro |
| 435346532457457342 | 2x Custom color |
- Type
- Requesting
- Provided by
- Individual
- Language
-
- JavaScript
