Compare commits

...

2 commits

Author SHA1 Message Date
ed9a476031 Add I Receive you Receieve labels
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
2024-02-27 18:49:36 +00:00
119fc6310f Fix not being able to decline your own trade 2024-02-27 18:42:29 +00:00
2 changed files with 18 additions and 18 deletions

View file

@ -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,
},
{

View file

@ -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,
},
{