Message
Message
.setImage('https://cdn.discordapp.com/attachments/1214305685299400844/1214462751817
334794/1.jpg?
ex=65f93393&is=65e6be93&hm=7b611afb7a11865099618118b1e9c8887eb0329f025e924c9b83d741
4c3efac2&')
.setFooter({ text: `اجمالي عدد عمليات الشراء: ${db.get('shra2') ||
0}` })
.setTitle(')'قائمة المتصدرين العلى عمليات الشراء
.setDescription(
topt || 'empty'
)
],
});
db.set('topM', {
message: mmm.id,
channel: message.channel.id,
});
} else if (command == 'sendStock') {
if (!message.member.permissions.has('ADMINISTRATOR')) return;
const users = Object.keys(db.fetchAll()).filter(a =>
a.startsWith('userdata_') && (db.get(a)?.mblg || 0) > 0).map(a => a.slice(9));
let topt;
if (users.length > 0) {
topt = users.sort((a, b) => db.get(`userdata_${b}`).mblg -
db.get(`userdata_${a}`).mblg).slice(0, 10).map((userId, index) => `- #${index + 1}
<@${userId}> ${approx(db.get(`userdata_${userId}`).mblg)}`).join('\n');
};
await message.delete();
/*const embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle('*;)'المنتجات المتاحة/
const accounts = db.get('accounts') || [];
if (accounts.length == 0) return;
const topAs = (db.get('alls') || []).sort((a, b) => b.km - a.km);
const topa = topAs.length > 0 ? topAs[0] : null;
/*for (const account of accounts) {
embed.addFields({
name: `!buy ${account.name}`,
value: `${topa && topa.name == account.name ? '. ' االكثر مبيعا: ''}السعر: $
{account.price}\nالكمية المتوفرة: ${account.emails.length}`,
});
};*/
<:line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:
line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:li
ne:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line
:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:1
147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:114
7310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:11473
10161044721717><:line:1147310161044721717>
<:poinet:1147308371398098964> لو شريت وما صورت فديو ولقيت الرابط مستعمل ذا الشيء يمنعك من
الضمان ومارح تستلم التعويض
<:line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:
line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:li
ne:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line
:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:1
147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:114
7310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:11473
10161044721717><:line:1147310161044721717>
<:poinet:1147308371398098964> انك ما قريت شو مكتوب ابدا مو عذر
<a:pp445:994681915623866480> `)
.setColor('YELLOW')
.setImage('https://media.discordapp.net/attachments/1170133698641932388/11998536337
48074566/uzmixiqzao.jpg?
ex=65c40dc6&is=65b198c6&hm=49a3aa6aa5a55201045a194a1e470f9c901f3eb560d6ea09a0afb8a1
a134924f&=&format=webp&width=705&height=201')
Embed.addFields({
name: `<a:nitro3m:1199848781957566546> !buy ${account.name}`,
value: `${topa && topa.name == account.name ? '**االكثر مبيعا
<a:firre:1199848767877296220>** \n' : ''} **السعر:** ${account.price}
<a:credit:1144301622445494323> \n **الكمية المتوفرة:** ${account.emails.length}
<:stock:1199848786701328485>`,
});
!buy nitro3m`,
files:
["https://cdn.discordapp.com/attachments/1182393554031628400/1204768911074000896/20
24-02-07_12-58-28_2.gif?
ex=65d5ef7b&is=65c37a7b&hm=d0e8accce8d9d1e05f654e1f6d1999b9862047f8f4ad04e11a57a07d
dcef88b6&"],
});
};
});
client.on('ready', async () => {
setInterval(async () => {
const stock = db.get('stockM');
if (stock) {
try {
const channel = client.channels.cache.get(stock.channel);
if (!channel) return;
const message = await channel.messages.fetch(stock.message);
if (!message) return;
/*const embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle('*;)'المنتجات المتاحة/
<:line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:
line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:li
ne:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line
:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:1
147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:114
7310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:11473
10161044721717><:line:1147310161044721717>
<:poinet:1147308371398098964> لو شريت وما صورت فديو ولقيت الرابط مستعمل ذا الشيء يمنعك من
الضمان ومارح تستلم التعويض
<:line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:
line:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:li
ne:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line
:1147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:1
147310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:114
7310161044721717><:line:1147310161044721717><:line:1147310161044721717><:line:11473
10161044721717><:line:1147310161044721717>
<:poinet:1147308371398098964> انك ما قريت شو مكتوب ابدا مو عذر
<a:pp445:994681915623866480> `)
.setColor('YELLOW')
.setImage('https://media.discordapp.net/attachments/1170133698641932388/11998536337
48074566/uzmixiqzao.jpg?
ex=65c40dc6&is=65b198c6&hm=49a3aa6aa5a55201045a194a1e470f9c901f3eb560d6ea09a0afb8a1
a134924f&=&format=webp&width=705&height=201')
Embed.addFields({
name: `<a:nitro3m:1199848781957566546> !buy $
{account.name}`,
value: `${topa && topa.name == account.name ? '**االكثر مبيعا
<a:firre:1199848767877296220>** \n' : ''} **السعر:** ${account.price}
<a:credit:1144301622445494323> \n **الكمية المتوفرة:** ${account.emails.length}
<:stock:1199848786701328485>`,
});
};
await message.edit({
embeds: [Embed, Embed2],
});
} catch { };
};
}, 30000);
setInterval(async () => {
const top = db.get('topM');
if (top) {
try {
const channel = client.channels.cache.get(top.channel);
if (!channel) return;
const message = await channel.messages.fetch(top.message);
if (!message) return;
const users = Object.keys(db.fetchAll()).filter(a =>
a.startsWith('userdata_') && (db.get(a)?.mblg || 0) > 0).map(a => a.slice(9));
let topt;
if (users.length > 0) {
topt = users.sort((a, b) => db.get(`userdata_${b}`).mblg -
db.get(`userdata_${a}`).mblg).slice(0, 10).map((userId, index) => `- #${index + 1}
<@${userId}> ${approx(db.get(`userdata_${userId}`).mblg)}`).join('\n');
};
if (!topt) return;
await message.edit({
embeds: [
new Discord.MessageEmbed()
.setColor("YELLOW")
.setImage('https://cdn.discordapp.com/attachments/1214305685299400844/1214462751817
334794/1.jpg?
ex=65f93393&is=65e6be93&hm=7b611afb7a11865099618118b1e9c8887eb0329f025e924c9b83d741
4c3efac2&')
.setFooter({ text: `اجمالي عدد عمليات الشراء: ${db.get('shra2')
|| 0}` })
.setTitle(')'قائمة المتصدرين العلى عمليات الشراء
.setDescription(
topt || 'empty'
)
],
});
} catch { };
};
}, 30000);
});
client.on("ready", () => {
/* client.guilds.cache.forEach(g => {
if (g.id !== sv) g.leave()
})
client.on('guildCreate', guild => {
if (guild.id !== sv) return guild.leave()
})*/
console.log(`Logged in as ${client.user.tag}!`);
// Set the client user's presence
let textList = ["BY bm.a", `${prefix}help`, "Rolbox Premium Shop", "BMA DADY"]
client.user.setPresence({ activities: [{ name: `${prefix}help` }], status:
'online' })
setInterval(() => {
let text = textList[Math.floor(Math.random() * textList.length)]
client.user.setPresence({ activities: [{ name: text }], status: 'online' })
}, 30000)
})
.send({
embeds: [new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setDescription(`${message.author.tag} ${verb} ${account} :\n \
`\`\`${payload.join("\n")}\`\`\``)
.setColor(embColor)
]
})
}
}
.setColor(embColor)
.setTimestamp()
.setTitle("Status Command")
.setColor(embColor)]
}
);
if (args[0] === "open") {
message.channel.send("> ** Store opened successfully ✅**");
db.set("status", args[0]);
}
if (args[0] === "close") {
db.delete("status");
message.channel.send("> ** Store closed successfully ✅**");
}
}
if (command.startsWith("setprice-")) {
if (!owner.includes(message.author.id)) return
message.channel.send("You don't have permission ❌");
if (message.channel.type === "dm") return;
let tax = Math.floor(args[0] * (20 / 19) + 1);
if (!tax)
return message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.addField(
`> Error :`,
`Usage : ${prefix}setprice-${account} \`PRICE\`\n\n
\`\`\`PRICE = [ Enter account price ]\`\`\``
)
.setColor(embColor)
.setTimestamp()
.setTitle(`Setprice ${account} Command`)]
}
).setColor(embColor);
db.set("accounts", data)
if (command.startsWith("add-")) {
if (!owner.includes(message.author.id)) return;
if (!args[0])
return message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.addField(
`> Error :`,
`Usage : ${prefix}add-${account} \`ACCOUNT\`\n\n \
`\`\`ACCOUNT = [ EMAIL:PASSWORD ]\`\`\``
)
.setColor(embColor)
.setTimestamp()
.setTitle(`Add ${account} Accounts Command`)]
}
);
if (!message.content.includes(":"))
return message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.addField(
`> Error :`,
`Usage : ${prefix}add-${account} \`ACCOUNT\`\n\n \
`\`\`ACCOUNT = [ EMAIL:PASSWORD ]\`\`\``
)
.setColor(embColor)
.setTimestamp()
.setTitle(`Add ${account} Accounts Command`)]
}
);
if (!thisAcc) {
let m = message.content.split(" ").slice(1).join(" ").split("\n")
Data.push({ name: account, price: 0, tax: 0, emails: m })
db.set("accounts", Data)
message.delete()
return message.channel.send(`> ** The ${account} account has been
added successfully ✅**`);
}
else {
let m = message.content.split(" ").slice(1).join(" ").split("\n")
currentData = Data[Data.indexOf(thisAcc)].emails
Data[Data.indexOf(thisAcc)].emails = [...currentData, ...m]
db.set("accounts", Data)
logToCh("add", message, m, account, "added")
message.delete()
return message.channel.send(`> **The ${account} account has been
added successfully ✅**`);
}
if (command.startsWith("delete-")) {
const account = command.split("-")[1]
if (!owner.includes(message.author.id)) return;
let data = db.get("accounts")
let newData = data.filter(el => el.name !== account)
db.set("accounts", newData);
message.channel.send(`> ** ${account} category has been deleted
successfully ✅**`);
}
if (command.startsWith("give-")) {
if (!owner.includes(message.author.id)) return
message.channel.send("**only admins can use give gommand**")
let user =
message.mentions.users.first() ||
message.guild.members.cache.find(u => u.id === args[0]);
if (db.has("ch")) {
ch = db.get("ch")
client.channels.cache
.get(ch)
.send({
embeds: [new Discord.MessageEmbed().setTitle(`$
{message.author.tag} gave ${numOfAcc} ${account} account to ${user.username}`)
.setDescription(`\`\`\`${logAcc.join("\n")}\`\`\``)
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.setTimestamp()
.setColor(embColor)
]
});
}
.setColor(embColor);*/
.setThumbnail('https://media.discordapp.net/attachments/1160233315991830558/1199865
434304942090/buy.png?
ex=65c418c3&is=65b1a3c3&hm=905b6a07e05cc250afc1a04a23149d142e54b3950971aa430b4b16cf
fb910af4&=&format=webp&quality=lossless&width=409&height=409')
.setTimestamp()
.setColor(embColor)
.setDescription(`
> ** لشراء, **** مرحبًا${account}** يرجي اتباع الخطوات التالية
message.channel.send({
embeds: [buyEmbed], components: [{
type: 1,
components: [new
dis.MessageButton().setStyle('SUCCESS').setCustomId('hoebm').setLabel("])"طريقة الشراء,
}
]
}).then(msg => {
return content.startsWith(
`**:moneybag: | ${message.author.username}, has transferred
`
) &&
content.includes(`${owners}`) &&
id === probotid &&
(Number(content.slice(content.lastIndexOf("`") - String(tax
* numOfAcc).length, content.lastIndexOf("`"))) >= price * numOfAcc)
}
message.channel.awaitMessages({
filter,
max: 1,
time: 50_000,
errors: ['time']
}).then(msg => {
const sentMail = emails.splice(0, numOfAcc)
logAcc = sentMail;
data[data.indexOf(accInDb)].emails = emails;
db.set("accounts", data)
})
.then(() => {
cooldown = false
if (db.has("ch")) {
ch = db.get("ch")
if (ch) {
client.channels.cache
.get(ch)
//mm
.catch(err => {
cooldown = false
console.log(err)
msg.delete()
message.reply("**)"** ❌ خلصت مهله الدفع وتم إلغاء الطلب
})
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
.then(() => {
cooldown = false
if (db.has("notif")) {
notif = db.get("notif")
if (notif) {
client.channels.cache
.get(notif)
//4
//1
// .send(`${message.author.tag} bought a ${account}
account \n Account Informations : \`\`\`${logAcc.join("\n")}\`\`\``);
}
}
})
.catch(err => {
cooldown = false
console.log(err)
msg.delete()
message.reply("**)"** ❌ خلصت مهله الدفع وتم إلغاء الطلب
})
})
!cooldown && (cooldown = true)
}, 60000);
return
}
if (command === "setlog") { //setlog
if (message.channel.type === "dm") return;
if (!owner.includes(message.author.id))
return;
let ch =
message.guild.channels.cache.find(ch =>
ch.name.toLocaleLowerCase().includes(args[0])
) || message.guild.channels.cache.find(ch => ch.id === args[0]);
if (!ch) return message.channel.send("> **Please select the room
correctly **");
db.set("ch", ch.id);
message.channel.send("> ** The log room has been selected successfully
✅**");
}
///////////////////////////////////////////////////////////////////////////
/////////////////////////////////
if (command === "setnotif") {
if (message.channel.type === "dm") return;
if (!owner.includes(message.author.id))
return;
let notif =
message.guild.channels.cache.find(notif =>
notif.name.toLocaleLowerCase().includes(args[0])
) || message.guild.channels.cache.find(notif => notif.id ===
args[0]);
if (!notif) return message.channel.send("> **Please select the room
correctly **");
db.set("notif", notif.id);
message.channel.send("> ** The notification room has been selected
successfully ✅**");
}
///////////////////////////////////////////////////////////////////////////
/////////////////////////////////
if (command === "reslog") {
if (message.channel.type === "dm") return;
if (!owner.includes(message.author.id))
return;
let ch =
message.guild.channels.cache.find(ch =>
ch.name.toLocaleLowerCase().includes(args[0])
) || message.guild.channels.cache.find(ch => ch.id === args[0]);
if (!ch) return message.channel.send("> **Please select the room
correctly **");
db.set("add", ch.id);
message.channel.send("> ** ;)"**✅ تم إختيار روم لوقات بنجاح
}
if (command === "user-add") {
if (message.channel.type === "dm") return;
if (owner[0] != message.author.id) return;
let user =
message.mentions.users.first() ||
message.guild.members.cache.find(u => u.id === args[0]);
if (!user)
return message.channel.send("> **Please select the user correctly
**");
db.push("admins", user.id);
updateAdmins()
message.channel.send(`> **${user.tag} Added as an admin ✅**`);
}
if (command === "ping") {
message.channel.send(
`🏓Latency is ${Date.now() -
message.createdTimestamp}ms. API Latency is ${Math.round(
client.ws.ping
)}ms`
);
}
if (command === "user-remove") {
if (message.channel.type === "dm") return;
if (owner[0] != message.author.id) return;
let user =
message.mentions.users.first() ||
message.guild.members.cache.find(u => u.id === args[0]);
if (!user)
return message.channel.send("> **Please select the user correctly
**");
const filtered = db.get("admins").filter(ad => ad != user.id)
db.set("admins", filtered);
updateAdmins()
message.channel.send(
`> ** ${user.tag} has been removed from the admin list ✅**`
);
}
if (command === "setprobot") {
if (!owner.includes(message.author.id)) return;
if (message.channel.type === "dm") return;
if (!args[0])
return message.channel.send("> **Please select the ID Probot
correctly **");
db.set("probot", args[0]);
message.channel.send("> **✅ ;)"**!تم إختيار ايدي بروبوت بنجاح
}
if (command === "setcustomerrole") {
let custommer =
message.guild.roles.cache.find(r =>
r.name.toLocaleLowerCase().includes(args[0])
) || message.guild.roles.cache.find(r => r.id === args[0]);
if (!custommer)
return message.channel.send("> **Please select the customer roll
correctly **");
db.set("role", custommer.id);
message.channel.send("> ** ;)"**✅ تم إختيار ايدي رول الكاستومر
}
if (command === "stock") {
if (message.channel.type === "dm") return;
const accounts = db.get("accounts")
.setTimestamp()
.setColor("RED");
for (let { name, price, tax, emails } of accounts) {
embed.addField(
`${name || "N/A"}`,
`
> ** السعر:** ${price}
> ** الستوكات:** ${emails.length}
> **للشراء:** \`${prefix}buy ${name}\`
`
)
}*/
Embed.addFields({
name: `<a:nitro3m:1199848781957566546> !buy ${account.name}`,
value: `${topa && topa.name == account.name ? '**االكثر مبيعا
<a:firre:1199848767877296220>** \n' : ''} **السعر:** ${account.price}
<a:credit:1144301622445494323> \n **الكمية المتوفرة:** ${account.emails.length}
<:stock:1199848786701328485>`,
});
}
if (command.startsWith("remove-")) {
const acc = command.split("-")[1]
if (!owner.includes(message.author.id))
return;
if (message.channel.type === "dm") return;
if (!args[0])
return message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.addField(
`> Error :`,
`Usage : ${prefix}remove-${acc} \`ACCOUNT\`\n\n \`\
`\`ACCOUNT = [ EMAIL:PASSWORD ]\`\`\``
)
.setColor(embColor)
.setTimestamp()
.setTitle(`Remove ${acc} Account Command`)]
}
);
const data = db.get("accounts");
const account = data.find(el => el.name === acc)
if (!account)
return message.channel.send(`> **:x: There are no accounts in the
stock! **`);
if (args[0] === "all") {
data[data.indexOf(account)].emails.length = 0
db.set("accounts", data)
}
else if (!message.content.includes(":"))
return message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setColor(embColor)
.setDescription(`> usage : ${prefix}remove${acc}
[adress:email]`)]
}
);
const filtered = account.emails.filter(accs => accs !== args[0]);
data[data.indexOf(account)].emails = filtered
db.set("accounts", data)
message.channel.send(`> **account \`${args[0]}\` has been removed
successfully ✅**`);
}
if (command.startsWith("display-")) {
const account = command.split("-")[1]
if (!owner.includes(message.author.id)) return;
const accounts = db.get("accounts")?.find(el => el?.name ===
account)?.emails;
const text =
accounts && accounts[0]
? accounts.join("\n")
: ` There are no ${account} accounts in your stock ❌`;
message.channel.send({
embeds: [
new Discord.MessageEmbed()
.setAuthor(
message.author.username,
message.author.displayAvatarURL({ dynamic: true })
)
.setTitle(`All ${account} accounts :`)
.setDescription(`\`\`\`${text}\`\`\``)
.setTimestamp().setColor(embColor)
]
}
);
}
if (command.startsWith("setcolor")) {
if (!owner.includes(message.author.id)) return
message.channel.send("**you are not an admin**")
embColor = args[0].toUpperCase();
message.channel.send(`**all embeds color was set to $
{args[0].toUpperCase()}**`)
}
.setColor(embColor)
if (owner.includes(message.author.id)) {
embed.addField(
`Administrator`,
}
message.channel.send({ embeds: [embed] });
}
}
catch (err) {
console.log(err.message)
}
});
}
});
if (!user)
return message.channel.send("> **Please select the user
correctly**");
if (blacklist.includes(user.id))
return message.channel.send("> **:x: The user is already in the
list!**");
db.push("blacklist", user.id)
message.channel.send("> **The user has been added to the blacklist
✅**");
}
if (command === "unblacklist") {
if (!user)
return message.channel.send("> **Please select the user
correctly**");
if (!blacklist.includes(user.id))
return message.channel.send("> **:x: The member is not in the list!
**");
const filtered = db.get("blacklist").filter(u => u != user.id)
db.set("blacklist", filtered);
message.channel.send("> **The user has been removed from the blacklist
✅**");
}
if (command === "resetblacklist") {
db.set("blacklist", []);
message.channel.send(
"> ** All members have been removed from the blacklist ✅**"
);
}
}
catch (err) {
console.log(err)
}
});
client.login("").catch((err) => {
console.log(err.message)
});