Add logger to project #183
4 changed files with 26 additions and 60 deletions
48
package-lock.json
generated
48
package-lock.json
generated
|
@ -1900,9 +1900,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.11.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz",
|
||||
"integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==",
|
||||
"version": "20.11.24",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
|
||||
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
|
@ -4766,12 +4766,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.18.2",
|
||||
"license": "MIT",
|
||||
"version": "4.18.3",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz",
|
||||
"integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.1",
|
||||
"body-parser": "1.20.2",
|
||||
"content-disposition": "0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.5.0",
|
||||
|
@ -4805,41 +4806,6 @@
|
|||
"node": ">= 0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/body-parser": {
|
||||
"version": "1.20.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"content-type": "~1.0.4",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"destroy": "1.2.0",
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.11.0",
|
||||
"raw-body": "2.5.1",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8",
|
||||
"npm": "1.2.8000 || >= 1.4.16"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/raw-body": {
|
||||
"version": "2.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"unpipe": "1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/external-editor": {
|
||||
"version": "3.1.0",
|
||||
"dev": true,
|
||||
|
|
|
@ -100,13 +100,13 @@ export default class Trade extends ButtonEvent {
|
|||
.setImage("https://i.imgur.com/9w5f1ls.gif")
|
||||
.addFields([
|
||||
{
|
||||
name: `${receiveUser.username} is giving`,
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
name: "I receieve",
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `${giveUser.username} is giving`,
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
name: "You receieve",
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ export default class Trade extends ButtonEvent {
|
|||
// No need to get expiry date
|
||||
const timeoutId = interaction.customId.split(" ")[7];
|
||||
|
||||
if (interaction.user.id !== receiveUserId || interaction.user.id !== giveUserId) {
|
||||
if (interaction.user.id != receiveUserId && interaction.user.id !==giveUserId) {
|
||||
await interaction.reply("You are not the user who the trade is intended for");
|
||||
return;
|
||||
}
|
||||
|
@ -170,13 +170,13 @@ export default class Trade extends ButtonEvent {
|
|||
.setImage("https://i.imgur.com/9w5f1ls.gif")
|
||||
.addFields([
|
||||
{
|
||||
name: `${receiveUser.username} is giving`,
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
name: "I Receive",
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `${giveUser.username} is giving`,
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
name: "You Receive",
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -63,6 +63,6 @@ export default class Give extends Command {
|
|||
|
||||
await inventory.Save(Inventory, inventory);
|
||||
|
||||
await interaction.reply(`${card.name} given to ${interaction.user}, they now have ${inventory.Quantity}`);
|
||||
await interaction.reply(`${card.name} given to ${user.username}, they now have ${inventory.Quantity}`);
|
||||
}
|
||||
}
|
|
@ -63,19 +63,19 @@ export default class Trade extends Command {
|
|||
const expiry = now.setMinutes(now.getMinutes() + 15);
|
||||
|
||||
const tradeEmbed = new EmbedBuilder()
|
||||
.setTitle("Trade Offer")
|
||||
.setTitle("⚠️ Trade Offer ⚠️")
|
||||
.setDescription(`Trade initiated between ${interaction.user.username} and ${user.username}`)
|
||||
.setColor(EmbedColours.Grey)
|
||||
.setImage("https://media1.tenor.com/m/KkZwKl2AQ2QAAAAd/trade-offer.gif")
|
||||
.addFields([
|
||||
{
|
||||
name: `${interaction.user.username} is giving`,
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
name: "I Receive",
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `${user.username} is giving`,
|
||||
value: `${receiveItem.id}: ${receiveItem.name}`,
|
||||
name: "You Receive",
|
||||
value: `${giveItem.id}: ${giveItem.name}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
@ -109,13 +109,13 @@ export default class Trade extends Command {
|
|||
.setImage("https://media1.tenor.com/m/KkZwKl2AQ2QAAAAd/trade-offer.gif")
|
||||
.addFields([
|
||||
{
|
||||
name: `${receiveUsername} is giving`,
|
||||
value: `${giveCardNumber}: ${giveCardName}`,
|
||||
name: "I Receive",
|
||||
value: `${receiveCardNumber}: ${receiveCardName}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
name: `${giveUsername} is giving`,
|
||||
value: `${receiveCardNumber}: ${receiveCardName}`,
|
||||
name: "You Receive",
|
||||
value: `${giveCardNumber}: ${giveCardName}`,
|
||||
inline: true,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue