|
1 |
| -const { MessageEmbed, MessageActionRow, MessageButton } = require(`discord.js`); |
2 |
| -const config = require(`${process.cwd()}/botconfig/config.json`); |
3 |
| -var ee = require(`${process.cwd()}/botconfig/embed.json`); |
4 |
| -const emoji = require(`${process.cwd()}/botconfig/emojis.json`); |
5 |
| -module.exports = { |
6 |
| - name: `premium`, |
7 |
| - category: `⚙️ Settings`, |
8 |
| - description: `Requests Premium for this Server`, |
9 |
| - usage: `premium`, |
10 |
| - memberpermissions: [`ADMINISTRATOR`], |
11 |
| - type: "bot", |
12 |
| - run: async (client, message, args, cmduser, text, prefix) => { |
13 |
| - |
14 |
| - let es = client.settings.get(message.guild.id, "embed");let ls = client.settings.get(message.guild.id, "language") |
15 |
| - try{ |
16 |
| - if(client.premium.get("global", "guilds").includes(message.guild.id)){ |
17 |
| - return message.reply(`❌ **This Guild is already a \`PREMIUM-GUILD\`**`) |
18 |
| - } |
19 |
| - let theowner = "NO OWNER DATA! ID: "; |
20 |
| - await message.guild.fetchOwner().then(({ user }) => { |
21 |
| - theowner = user; |
22 |
| - }).catch(() => {}) |
23 |
| - let embed = new MessageEmbed() |
24 |
| - .setColor("GREEN") |
25 |
| - .setTitle(`✅ A new Server requests **PREMIUM**`) |
26 |
| - .addField("Guild Info", `>>> \`\`\`${message.guild.name} (${message.guild.id})\`\`\``) |
27 |
| - .addField("Owner Info", `>>> \`\`\`${theowner ? `${theowner.tag} (${theowner.id})` : `${theowner} (${message.guild.ownerId})`}\`\`\``) |
28 |
| - .addField("Member Count", `>>> \`\`\`${message.guild.memberCount}\`\`\``) |
29 |
| - .addField("Requested By:", `>>> \`\`\`${message.author.tag} (${message.author.id})\`\`\``) |
30 |
| - .setThumbnail(message.guild.iconURL({dynamic: true})) |
31 |
| - .setFooter(`${message.author.id}-${message.guild.id}`, message.author.displayAvatarURL({dynamic: true})) |
32 |
| - for(const owner of config.ownerIDS){ |
33 |
| - client.users.fetch(owner).then(user => { |
34 |
| - user.send({ embeds: [embed], components: [ |
35 |
| - new MessageActionRow().addComponents([ |
36 |
| - new MessageButton().setStyle("SUCCESS").setEmoji("✅").setCustomId("PREMIUM-ACCEPT").setLabel("Accept"), |
37 |
| - new MessageButton().setStyle("DANGER").setEmoji("❌").setCustomId("PREMIUM-DENY").setLabel("Deny") |
38 |
| - ]) |
39 |
| - ] }).catch(() => {}); |
40 |
| - }).catch(() => {}); |
41 |
| - } |
42 |
| - return message.reply(`✅ **APPLIED FOR PREMIUM**`) |
43 |
| - } catch (e) { |
44 |
| - console.log(String(e.stack).grey.bgRed) |
45 |
| - return message.reply({embeds : [new MessageEmbed() |
46 |
| - .setColor(es.wrongcolor) |
47 |
| - .setFooter(es.footertext, es.footericon) |
48 |
| - .setTitle(client.la[ls].common.erroroccur) |
49 |
| - .setDescription(`\`\`\`${String(e.message ? e.message : e).substr(0, 2000)}\`\`\``) |
50 |
| - ]}); |
51 |
| - } |
52 |
| - } |
53 |
| -}; |
54 |
| -/** |
55 |
| - * @INFO |
56 |
| - * Bot Coded by Tomato#6966 | https://discord.gg/milrato |
57 |
| - * @INFO |
58 |
| - * Work for Milrato Development | https://milrato.dev |
59 |
| - * @INFO |
60 |
| - * Please mention him / Milrato Development, when using this Code! |
61 |
| - * @INFO |
62 |
| -*/ |
| 1 | +const { MessageEmbed, MessageActionRow, MessageButton } = require(`discord.js`); |
| 2 | +const config = require(`${process.cwd()}/botconfig/config.json`); |
| 3 | +var ee = require(`${process.cwd()}/botconfig/embed.json`); |
| 4 | +const emoji = require(`${process.cwd()}/botconfig/emojis.json`); |
| 5 | +module.exports = { |
| 6 | + name: `premium`, |
| 7 | + category: `⚙️ Settings`, |
| 8 | + description: `Requests Premium for this Server`, |
| 9 | + usage: `premium`, |
| 10 | + memberpermissions: [`ADMINISTRATOR`], |
| 11 | + type: "bot", |
| 12 | + run: async (client, message, args, cmduser, text, prefix) => { |
| 13 | + |
| 14 | + let es = client.settings.get(message.guild.id, "embed");let ls = client.settings.get(message.guild.id, "language") |
| 15 | + try{ |
| 16 | + if(client.premium.get("global", "guilds").includes(message.guild.id)){ |
| 17 | + return message.reply(`❌ **This Guild is already a \`PREMIUM-GUILD\`**`) |
| 18 | + } |
| 19 | + let theowner = "NO OWNER DATA! ID: "; |
| 20 | + await message.guild.fetchOwner().then(({ user }) => { |
| 21 | + theowner = user; |
| 22 | + }).catch(() => {}) |
| 23 | + let embed = new MessageEmbed() |
| 24 | + .setColor("GREEN") |
| 25 | + .setTitle(`✅ A new Server requests **PREMIUM**`) |
| 26 | + .addField("Guild Info", `>>> \`\`\`${message.guild.name} (${message.guild.id})\`\`\``) |
| 27 | + .addField("Owner Info", `>>> \`\`\`${theowner ? `${theowner.tag} (${theowner.id})` : `${theowner} (${message.guild.ownerId})`}\`\`\``) |
| 28 | + .addField("Member Count", `>>> \`\`\`${message.guild.memberCount}\`\`\``) |
| 29 | + .addField("Requested By:", `>>> \`\`\`${message.author.tag} (${message.author.id})\`\`\``) |
| 30 | + .setThumbnail(message.guild.iconURL({dynamic: true})) |
| 31 | + .setFooter(`${message.author.id}-${message.guild.id}`, message.author.displayAvatarURL({dynamic: true})) |
| 32 | + for(const owner of config.ownerIDS){ |
| 33 | + client.users.fetch(owner).then(user => { |
| 34 | + user.send({ embeds: [embed], components: [ |
| 35 | + new MessageActionRow().addComponents([ |
| 36 | + new MessageButton().setStyle("SUCCESS").setEmoji("✅").setCustomId("PREMIUM-ACCEPT").setLabel("Accept"), |
| 37 | + new MessageButton().setStyle("DANGER").setEmoji("❌").setCustomId("PREMIUM-DENY").setLabel("Deny") |
| 38 | + ]) |
| 39 | + ] }).catch(() => {}); |
| 40 | + }).catch(() => {}); |
| 41 | + } |
| 42 | + return message.reply(`✅ **APPLIED FOR PREMIUM**`) |
| 43 | + } catch (e) { |
| 44 | + console.log(String(e.stack).grey.bgRed) |
| 45 | + return message.reply({embeds : [new MessageEmbed() |
| 46 | + .setColor(es.wrongcolor) |
| 47 | + .setFooter(es.footertext, es.footericon) |
| 48 | + .setTitle(client.la[ls].common.erroroccur) |
| 49 | + .setDescription(`\`\`\`${String(e.message ? e.message : e).substr(0, 2000)}\`\`\``) |
| 50 | + ]}); |
| 51 | + } |
| 52 | + } |
| 53 | +}; |
| 54 | +/** |
| 55 | + * @INFO |
| 56 | + * Bot Coded by Tomato#6966 | https://discord.gg/milrato |
| 57 | + * @INFO |
| 58 | + * Work for Milrato Development | https://milrato.dev |
| 59 | + * @INFO |
| 60 | + * Please mention him / Milrato Development, when using this Code! |
| 61 | + * @INFO |
| 62 | +*/ |
0 commit comments