byyterush
📎 1 file 4,346 chars
📄
pasted-code-1769100425557.txt
txt 142 lines
▶
add that role with 1461659668278677515
can delte , claim the ticket
and as i told you the there will be some stock so a button will come when the member is asked for payment validation there will another another embed come saying click to release the stock to {ticket} {userthat opened the ticket }
and all the ticket logs to 1463102571467243682

and make like the payment one is goood that message but make it in embed and another message will come before it that type !pay_ltc to pay that one this one :

<:RainyMM_dollar:1462683096074682481> Enter Quantity
Enter the quantity of the {item}
this will have two buttons like saying enter when clck on enter it will say enter the amoount in 2minutes after he had added it in number if he added 2 then give him 2 stock from the item when the admin will clck on release this button will come after the member has asked for vcalidate payment
first welcome
second one will claim and delte butotn
third one with amount
then pay with !pay_ltc one and then aftervalidate
this one

<:RainyMM_dollar:1462683096074682481> Payment !

Click on Release to Send the stock to the {user} {ticket}
this will have release button





and when the bot gives say enter amount then the bot should tell the price total price that they have to pay 

Discord Dec0ration
:RainyMM_dollar: Prices (Via G1ft)

Original Price → Discounted Price

$4.99 :aBlue: $1.89 | 170₹
$5.99 :aBlue: $2.39 | 225₹
$6.99 :aBlue: $2.89 | 265₹
$7.99 :aBlue: $3.29 | 300₹
$8.49 :aBlue: $3.45 | 320₹
$9.99 :aBlue: $3.89 | 370₹
$11.99 :aBlue: $4.25 | 415₹

Discord Dec0ration
Discord Dec0ration
:RainyMM_dollar: Prices (Via login)

Original Price → Discounted Price

$4.99 :aBlue: $1.25 | 110₹
$5.99 :aBlue: $1.70 | 160₹
$6.99 :aBlue: $2.75 | 265₹
$7.99 :aBlue: $3.20 | 305₹
$8.49 :aBlue: $3.35 | 325₹
$9.99 :aBlue: $3.95 | 380₹
$11.99 :aBlue: $4.45 | 430₹

Discord Nameplate
(Via Login / G1ft)

Original Price → Discounted Price

Nameplates • By Log1n
$4.99 :aBlue: $1.39 | ₹129
$5.99 :aBlue: $1.99 | ₹180
$9.99 :aBlue: $4.49 | ₹430
$11.99 :aBlue: $5.29 | ₹510

Nameplates • By G1ft
$4.99 :aBlue: $1.89 | ₹175
$5.99 :aBlue: $2.40 | ₹235
$9.99 :aBlue: $5.30 | ₹500
$11.99 :aBlue: $5.90 | ₹560

UwU C@sh
​
:blurpleBellNotification: Instant Delivery - No Delays
​
:blurplehome: Above 5M = 23₹ / :L2c:0.25$
​
:blurple_marketcar: Bulk Orders - Ever Cheaper
How do, you gonna Purchase?

Discord Nitro Accounts
Discord Nitro Accounts
:blurple_nitro: N1tr0 Account [1-Month]
:RainyMM_dollar: Price: 1$/p

:blurple_nitro: N1tr0 Account [3-Month]
:RainyMM_dollar: Price: 2.3$/p

:blurple_nitro: N1tr0 Account [4-Month]
:RainyMM_dollar: Price: 2.7$/p

:Blue_Person: UHQ QUALITY ACCOUNTS
How do, you gonna Purchase?
After Looking Through The

Pr0mo Links Húb
:blurpleActivityIcon: Product: N1tr0 Promo [1-Month]
:stock: Stock: 250+
:RainyMM_dollar: Price: 0.26$/p
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: N1tr0 Promo [3-Month]
:stock: Stock: 30+
:RainyMM_dollar: Price: 0.9$/p
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
How do, you gonna Purchase?

N1tr0 B00st Upgrades
:blurpleActivityIcon: Product: Serv3r B00sts [1-Month]
:stock: Stock: 100+
:RainyMM_dollar: Price: 5$/p 14x
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: Serv3r B00sts [3-Month]
:stock: Stock: 50+
:RainyMM_dollar: Price: 9$/p 14x
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK

Community M3mbers
:blurpleActivityIcon: Product: Member [ONLINE]
:stock: Stock: 10000+
:RainyMM_dollar: Price: 3$/Per/k
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: Members [OFFLINE]
:stock: Stock: 15000+
:RainyMM_dollar: Price: 1.5$/Per/k
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK

Discord Aged Accounts
Discord Aged Accounts (2016–2019)
:Blue_Person: 2016 — 8.59$/p
:Blue_Person: 2017 — 4.29$/p
:Blue_Person: 2018 — 3.19$/p
:Blue_Person: 2019 — 1.89$/p
Discord Aged Accounts (2020–2024)
:Blue_Person: 2020 — 1.49$/p
:Blue_Person: 2021 — 1.59$/p
:Blue_Person: 2022 — 1.29$/p
:Blue_Person: 2023 — 1.09$/p
:Blue_Person: 2024 — 0.79$/p

:blurplehome: UHQ QUALITY ACCOU

the bot will give the price that the buyer has to pay
Kodari AI
KodariJan 22 at 4:56 pm 28,481 (v2)
  • Read index.js to understand current bot structure and ticket system.

  • Read package.json to confirm dependencies like discord.js.

  • Analyze user requirements for ticket flow: welcome, claim/delete buttons, quantity entry with price calculation, payment command, validation embed with release button, logging to specific channel.

  • Update index.js to implement the new ticket handling logic, embeds, buttons, and role addition.

  • Ensure price lists are integrated for calculations based on item types from JSON files.

  • Add logic for stock release upon button click by admin.

  • Log ticket activities to channel ID 1463102571467243682.

byyterush
📎 1 file 4,346 chars
📄
pasted-code-1769101692618.txt
txt 142 lines
▶
add that role with 1461659668278677515
can delte , claim the ticket
and as i told you the there will be some stock so a button will come when the member is asked for payment validation there will another another embed come saying click to release the stock to {ticket} {userthat opened the ticket }
and all the ticket logs to 1463102571467243682

and make like the payment one is goood that message but make it in embed and another message will come before it that type !pay_ltc to pay that one this one :

<:RainyMM_dollar:1462683096074682481> Enter Quantity
Enter the quantity of the {item}
this will have two buttons like saying enter when clck on enter it will say enter the amoount in 2minutes after he had added it in number if he added 2 then give him 2 stock from the item when the admin will clck on release this button will come after the member has asked for vcalidate payment
first welcome
second one will claim and delte butotn
third one with amount
then pay with !pay_ltc one and then aftervalidate
this one

<:RainyMM_dollar:1462683096074682481> Payment !

Click on Release to Send the stock to the {user} {ticket}
this will have release button





and when the bot gives say enter amount then the bot should tell the price total price that they have to pay 

Discord Dec0ration
:RainyMM_dollar: Prices (Via G1ft)

Original Price → Discounted Price

$4.99 :aBlue: $1.89 | 170₹
$5.99 :aBlue: $2.39 | 225₹
$6.99 :aBlue: $2.89 | 265₹
$7.99 :aBlue: $3.29 | 300₹
$8.49 :aBlue: $3.45 | 320₹
$9.99 :aBlue: $3.89 | 370₹
$11.99 :aBlue: $4.25 | 415₹

Discord Dec0ration
Discord Dec0ration
:RainyMM_dollar: Prices (Via login)

Original Price → Discounted Price

$4.99 :aBlue: $1.25 | 110₹
$5.99 :aBlue: $1.70 | 160₹
$6.99 :aBlue: $2.75 | 265₹
$7.99 :aBlue: $3.20 | 305₹
$8.49 :aBlue: $3.35 | 325₹
$9.99 :aBlue: $3.95 | 380₹
$11.99 :aBlue: $4.45 | 430₹

Discord Nameplate
(Via Login / G1ft)

Original Price → Discounted Price

Nameplates • By Log1n
$4.99 :aBlue: $1.39 | ₹129
$5.99 :aBlue: $1.99 | ₹180
$9.99 :aBlue: $4.49 | ₹430
$11.99 :aBlue: $5.29 | ₹510

Nameplates • By G1ft
$4.99 :aBlue: $1.89 | ₹175
$5.99 :aBlue: $2.40 | ₹235
$9.99 :aBlue: $5.30 | ₹500
$11.99 :aBlue: $5.90 | ₹560

UwU C@sh
​
:blurpleBellNotification: Instant Delivery - No Delays
​
:blurplehome: Above 5M = 23₹ / :L2c:0.25$
​
:blurple_marketcar: Bulk Orders - Ever Cheaper
How do, you gonna Purchase?

Discord Nitro Accounts
Discord Nitro Accounts
:blurple_nitro: N1tr0 Account [1-Month]
:RainyMM_dollar: Price: 1$/p

:blurple_nitro: N1tr0 Account [3-Month]
:RainyMM_dollar: Price: 2.3$/p

:blurple_nitro: N1tr0 Account [4-Month]
:RainyMM_dollar: Price: 2.7$/p

:Blue_Person: UHQ QUALITY ACCOUNTS
How do, you gonna Purchase?
After Looking Through The

Pr0mo Links Húb
:blurpleActivityIcon: Product: N1tr0 Promo [1-Month]
:stock: Stock: 250+
:RainyMM_dollar: Price: 0.26$/p
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: N1tr0 Promo [3-Month]
:stock: Stock: 30+
:RainyMM_dollar: Price: 0.9$/p
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
How do, you gonna Purchase?

N1tr0 B00st Upgrades
:blurpleActivityIcon: Product: Serv3r B00sts [1-Month]
:stock: Stock: 100+
:RainyMM_dollar: Price: 5$/p 14x
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: Serv3r B00sts [3-Month]
:stock: Stock: 50+
:RainyMM_dollar: Price: 9$/p 14x
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK

Community M3mbers
:blurpleActivityIcon: Product: Member [ONLINE]
:stock: Stock: 10000+
:RainyMM_dollar: Price: 3$/Per/k
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK
:blurpleActivityIcon: Product: Members [OFFLINE]
:stock: Stock: 15000+
:RainyMM_dollar: Price: 1.5$/Per/k
:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK

Discord Aged Accounts
Discord Aged Accounts (2016–2019)
:Blue_Person: 2016 — 8.59$/p
:Blue_Person: 2017 — 4.29$/p
:Blue_Person: 2018 — 3.19$/p
:Blue_Person: 2019 — 1.89$/p
Discord Aged Accounts (2020–2024)
:Blue_Person: 2020 — 1.49$/p
:Blue_Person: 2021 — 1.59$/p
:Blue_Person: 2022 — 1.29$/p
:Blue_Person: 2023 — 1.09$/p
:Blue_Person: 2024 — 0.79$/p

:blurplehome: UHQ QUALITY ACCOU

the bot will give the price that the buyer has to pay
Kodari can make mistakes. Review important code before using.
Files
alt-accounts.json
decorations-via-gift-link.json
decorations-via-login.json
id-tags.json
index.js
members-offline.json
members-online.json
nitro-promo-1m.json
nitro-promo-3m.json
package.json
uwu.json
Code
11 521
index.js
const { Client, GatewayIntentBits, Partials, EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder, ButtonBuilder, ButtonStyle, ChannelType, PermissionFlagsBits, AttachmentBuilder } = require('discord.js');
require('dotenv').config();
const fs = require('fs');
const path = require('path');

const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
    GatewayIntentBits.GuildMembers
  ],
  partials: [Partials.Message, Partials.Channel, Partials.Reaction]
});

client.once('ready', () => {
  console.log(`Bot is ready! Logged in as ${client.user.tag}`);
});

const itemsPath = path.join(__dirname, 'items');

function getStock(item) {
  const filePath = path.join(itemsPath, `${item}.json`);
  if (!fs.existsSync(filePath)) return null;
  return JSON.parse(fs.readFileSync(filePath, 'utf8'));
}

function saveStock(item, data) {
  const filePath = path.join(itemsPath, `${item}.json`);
  fs.writeFileSync(filePath, JSON.stringify(data, null, 2));
}

const itemTypes = {
  'uwu': 'no_stock',
  'nitro-promo-3m': 'link',
  'nitro-promo-1m': 'link',
  'alt-accounts': 'account',
  'decorations-via-gift-link': 'link',
  'decorations-via-login': 'account',
  'id-tags': 'link',
  'members-offline': 'account',
  'members-online': 'account'
};

const embedTemplates = {
  'uwu': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying UWU')
    .setDescription('**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**')
    .setColor('Blue'),
  'nitro-promo-3m': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying N1tro Promo 3m')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Link : ||${data.link}||\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'nitro-promo-1m': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying N1tro Promo 1m')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Link : ||${data.link}||\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'alt-accounts': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying Aged Accounts')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Email : ${data.email}\nPass : ${data.pass}\nToken : ${data.token}\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'decorations-via-gift-link': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying Decorations via Gift Link')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Link : ||${data.link}||\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'decorations-via-login': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying Decorations via Login')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Email : ${data.email}\nPass : ${data.pass}\nToken : ${data.token}\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'id-tags': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying ID Tags')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Link : ||${data.link}||\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'members-offline': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying Members Offline')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Email : ${data.email}\nPass : ${data.pass}\nToken : ${data.token}\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue'),
  'members-online': (data) => new EmbedBuilder()
    .setTitle('# <:BlueZap:1462684329837854864> Thanks for Buying Members Online')
    .setDescription(`<:arrow_blue_d:1462410346407923771>  Email : ${data.email}\nPass : ${data.pass}\nToken : ${data.token}\n\n**<:blue_booster:1462314226302586933>  Thank you for choosing Stashr Mart — your trust keeps us going.**\n**<:tick:1462407420428025911>  Kindly drop a vouch in** <#1461259154890162176>** and share your experience!**`)
    .setColor('Blue')
};

const ticketCategory = '1462818661424173294';
const claimedCategory = '1462818847680626710';
const staffRole = '1461659668278677515';
const logChannelId = '1463102571467243682';

const itemOptions = [
  { label: 'UWU', value: 'uwu' },
  { label: 'N1tro Promo 1m', value: 'nitro-promo-1m' },
  { label: 'N1tro Prmo 3m', value: 'nitro-promo-3m' },
  { label: 'alt Accounts', value: 'alt-accounts' },
  { label: 'Members Online', value: 'members-online' },
  { label: 'members Offline', value: 'members-offline' },
  { label: 'id tags', value: 'id-tags' },
  { label: 'Decorations via gift link', value: 'decorations-via-gift-link' },
  { label: 'decorations via login', value: 'decorations-via-login' }
];

const prices = {
  'uwu': { type: 'special', min: 5, priceUSD: 0.25, priceINR: 23, unit: 1 },
  'nitro-promo-1m': { type: 'single', priceUSD: 0.26, unit: 1 },
  'nitro-promo-3m': { type: 'single', priceUSD: 0.9, unit: 1 },
  'alt-accounts': { type: 'tiers', tiers: [
    {label: '2016 - $8.59', value: '2016', priceUSD: 8.59},
    {label: '2017 - $4.29', value: '2017', priceUSD: 4.29},
    {label: '2018 - $3.19', value: '2018', priceUSD: 3.19},
    {label: '2019 - $1.89', value: '2019', priceUSD: 1.89},
    {label: '2020 - $1.49', value: '2020', priceUSD: 1.49},
    {label: '2021 - $1.59', value: '2021', priceUSD: 1.59},
    {label: '2022 - $1.29', value: '2022', priceUSD: 1.29},
    {label: '2023 - $1.09', value: '2023', priceUSD: 1.09},
    {label: '2024 - $0.79', value: '2024', priceUSD: 0.79},
  ] },
  'members-online': { type: 'single', priceUSD: 3, unit: 1000 },
  'members-offline': { type: 'single', priceUSD: 1.5, unit: 1000 },
  'id-tags': { type: 'tiers', tiers: [
    {label: 'Login $4.99 -> $1.39 | 129₹', value: 'login-4.99', priceUSD: 1.39, priceINR: 129},
    {label: 'Login $5.99 -> $1.99 | 180₹', value: 'login-5.99', priceUSD: 1.99, priceINR: 180},
    {label: 'Login $9.99 -> $4.49 | 430₹', value: 'login-9.99', priceUSD: 4.49, priceINR: 430},
    {label: 'Login $11.99 -> $5.29 | 510₹', value: 'login-11.99', priceUSD: 5.29, priceINR: 510},
    {label: 'Gift $4.99 -> $1.89 | 175₹', value: 'gift-4.99', priceUSD: 1.89, priceINR: 175},
    {label: 'Gift $5.99 -> $2.40 | 235₹', value: 'gift-5.99', priceUSD: 2.40, priceINR: 235},
    {label: 'Gift $9.99 -> $5.30 | 500₹', value: 'gift-9.99', priceUSD: 5.30, priceINR: 500},
    {label: 'Gift $11.99 -> $5.90 | 560₹', value: 'gift-11.99', priceUSD: 5.90, priceINR: 560},
  ] },
  'decorations-via-gift-link': { type: 'tiers', tiers: [
    {label: '$4.99 -> $1.89 | 170₹', value: '4.99', priceUSD: 1.89, priceINR: 170},
    {label: '$5.99 -> $2.39 | 225₹', value: '5.99', priceUSD: 2.39, priceINR: 225},
    {label: '$6.99 -> $2.89 | 265₹', value: '6.99', priceUSD: 2.89, priceINR: 265},
    {label: '$7.99 -> $3.29 | 300₹', value: '7.99', priceUSD: 3.29, priceINR: 300},
    {label: '$8.49 -> $3.45 | 320₹', value: '8.49', priceUSD: 3.45, priceINR: 320},
    {label: '$9.99 -> $3.89 | 370₹', value: '9.99', priceUSD: 3.89, priceINR: 370},
    {label: '$11.99 -> $4.25 | 415₹', value: '11.99', priceUSD: 4.25, priceINR: 415},
  ] },
  'decorations-via-login': { type: 'tiers', tiers: [
    {label: '$4.99 -> $1.25 | 110₹', value: '4.99', priceUSD: 1.25, priceINR: 110},
    {label: '$5.99 -> $1.70 | 160₹', value: '5.99', priceUSD: 1.70, priceINR: 160},
    {label: '$6.99 -> $2.75 | 265₹', value: '6.99', priceUSD: 2.75, priceINR: 265},
    {label: '$7.99 -> $3.20 | 305₹', value: '7.99', priceUSD: 3.20, priceINR: 305},
    {label: '$8.49 -> $3.35 | 325₹', value: '8.49', priceUSD: 3.35, priceINR: 325},
    {label: '$9.99 -> $3.95 | 380₹', value: '9.99', priceUSD: 3.95, priceINR: 380},
    {label: '$11.99 -> $4.45 | 430₹', value: '11.99', priceUSD: 4.45, priceINR: 430},
  ] }
};

const priceDescriptions = {
  'decorations-via-gift-link': `Discord Dec0ration\n:RainyMM_dollar: Prices (Via G1ft)\n\nOriginal Price → Discounted Price\n\n$4.99 :aBlue: $1.89 | 170₹\n$5.99 :aBlue: $2.39 | 225₹\n$6.99 :aBlue: $2.89 | 265₹\n$7.99 :aBlue: $3.29 | 300₹\n$8.49 :aBlue: $3.45 | 320₹\n$9.99 :aBlue: $3.89 | 370₹\n$11.99 :aBlue: $4.25 | 415₹`,
  'decorations-via-login': `Discord Dec0ration\n:RainyMM_dollar: Prices (Via login)\n\nOriginal Price → Discounted Price\n\n$4.99 :aBlue: $1.25 | 110₹\n$5.99 :aBlue: $1.70 | 160₹\n$6.99 :aBlue: $2.75 | 265₹\n$7.99 :aBlue: $3.20 | 305₹\n$8.49 :aBlue: $3.35 | 325₹\n$9.99 :aBlue: $3.95 | 380₹\n$11.99 :aBlue: $4.45 | 430₹`,
  'id-tags': `Discord Nameplate\n(Via Login / G1ft)\n\nOriginal Price → Discounted Price\n\nNameplates • By Log1n\n$4.99 :aBlue: $1.39 | ₹129\n$5.99 :aBlue: $1.99 | ₹180\n$9.99 :aBlue: $4.49 | ₹430\n$11.99 :aBlue: $5.29 | ₹510\n\nNameplates • By G1ft\n$4.99 :aBlue: $1.89 | ₹175\n$5.99 :aBlue: $2.40 | ₹235\n$9.99 :aBlue: $5.30 | ₹500\n$11.99 :aBlue: $5.90 | ₹560`,
  'uwu': `UwU C@sh\n​\n:blurpleBellNotification: Instant Delivery - No Delays\n​\n:blurplehome: Above 5M = 23₹ / :L2c:0.25$\n​\n:blurple_marketcar: Bulk Orders - Ever Cheaper\nHow do, you gonna Purchase?`,
  'nitro-promo-1m': `Pr0mo Links Húb\n:blurpleActivityIcon: Product: N1tr0 Promo [1-Month]\n:stock: Stock: 250+\n:RainyMM_dollar: Price: 0.26$/p\n:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK\nHow do, you gonna Purchase?`,
  'nitro-promo-3m': `Pr0mo Links Húb\n:blurpleActivityIcon: Product: N1tr0 Promo [3-Month]\n:stock: Stock: 30+\n:RainyMM_dollar: Price: 0.9$/p\n:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK\nHow do, you gonna Purchase?`,
  'members-online': `Community M3mbers\n:blurpleActivityIcon: Product: Member [ONLINE]\n:stock: Stock: 10000+\n:RainyMM_dollar: Price: 3$/Per/k\n:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK`,
  'members-offline': `Community M3mbers\n:blurpleActivityIcon: Product: Members [OFFLINE]\n:stock: Stock: 15000+\n:RainyMM_dollar: Price: 1.5$/Per/k\n:BlueZap: UHQ QUALITY | FRESH CLAIMED | NO WATERMARK`,
  'alt-accounts': `Discord Aged Accounts\nDiscord Aged Accounts (2016–2019)\n:Blue_Person: 2016 — 8.59$/p\n:Blue_Person: 2017 — 4.29$/p\n:Blue_Person: 2018 — 3.19$/p\n:Blue_Person: 2019 — 1.89$/p\nDiscord Aged Accounts (2020–2024)\n:Blue_Person: 2020 — 1.49$/p\n:Blue_Person: 2021 — 1.59$/p\n:Blue_Person: 2022 — 1.29$/p\n:Blue_Person: 2023 — 1.09$/p\n:Blue_Person: 2024 — 0.79$/p\n\n:blurplehome: UHQ QUALITY ACCOU`
};

const ticketStates = new Map();

function getItemAndUserFromChannel(channel) {
  const parts = channel.name.split('-');
  const userId = parts.pop();
  const item = parts.slice(1).join('-');
  return { item, userId };
}

async function sendQuantityPrompt(channel, item) {
  const qtyEmbed = new EmbedBuilder()
    .setTitle('<:RainyMM_dollar:1462683096074682481> Enter Quantity')
    .setDescription(`Enter the quantity of the ${item}`)
    .setColor('Blue');
  const qtyRow = new ActionRowBuilder().addComponents(
    new ButtonBuilder().setCustomId('enter_quantity').setLabel('Enter').setStyle(ButtonStyle.Primary)
  );
  await channel.send({ embeds: [qtyEmbed], components: [qtyRow] });
}

function calculateTotal(item, tier, quantity) {
  const info = prices[item];
  let usd = 0;
  let inr = null;
  if (info.type === 'tiers') {
    const t = info.tiers.find(tt => tt.value === tier);
    usd = quantity * t.priceUSD;
    if (t.priceINR) inr = quantity * t.priceINR;
  } else if (info.type === 'single') {
    usd = (quantity / info.unit) * info.priceUSD;
  } else if (info.type === 'special') {
    usd = quantity * info.priceUSD;
    inr = quantity * info.priceINR;
  }
  return { usd: usd.toFixed(2), inr };
}

client.on('messageCreate', async (message) => {
  if (message.content.startsWith('!manual_buy')) {
    const args = message.content.split(' ').slice(1);
    if (args.length === 0) {