Skip to content

Commit

Permalink
Major update: Using env vars and config as names
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Wood committed Sep 30, 2024
1 parent de5b9a9 commit 9d93342
Show file tree
Hide file tree
Showing 114 changed files with 522 additions and 576 deletions.
2 changes: 1 addition & 1 deletion .upm/store.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"db11a897daa420d50cfedc91ca012076","lockfileHash":"1a9d033bd68f7b96ddae4ab0f36f51d7","guessedImports":["discord.js","dotenv","lodash","discord-hybrid-sharding"],"guessedImportsHash":"34448c0cd574409e26b8d9e0f192ba84"}}}
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"db11a897daa420d50cfedc91ca012076","lockfileHash":"1a9d033bd68f7b96ddae4ab0f36f51d7","guessedImports":["discord-hybrid-sharding","dotenv","lodash","discord.js"],"guessedImportsHash":"7f757502b57cec8312468e559b643275"}}}
7 changes: 3 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"botName": "asasdsadfgdrsdg6u5uy",
"clientId": "1135714988493910136",
"botName": "MEE8 (New and Improved)",
"owner": "1067137336674107453",
"developers": ["1153363797701046327", "1118665799209599006", "793174232804753439"],
"status": "!help | website here",
"discord": "https://discord.gg/",
"discord": "https://discord.gg/hYzXf2vAxE",
"dashboard": "true",
"server": "",
"server": "https://discord.gg/hYzXf2vAxE",
"prefix": "!",
"webhooks": {
"logs": "https://discord.com/api/webhooks/1279227126486270005/YcwhYvEJNS_xfdoZfkb_C5HyesDdGFxVzcH9fbhPQCixgeCz1muUWnoBIt74BoQMBlFx",
Expand Down
36 changes: 23 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ client.on("interactionCreate", async (interaction) => {

if (!slashCommand) return;

const subcommand = interaction.options.getSubcommand(false);

try {
await slashCommand.execute(interaction);
await logger.info(`/${slashCommand.data.name} (${subcommand ? `${subcommand}` : 'No subcommand executed'}) ran by "${interaction.user.username}" (${interaction.user.id}) on guild "${interaction.guild.name}" (${interaction.guild.id}) in channel "${interaction.channel.name}" (${interaction.channel.id})`, { label: "Slash Commmand" });
} catch (error) {
await interaction.reply({
content: "There was an error while executing this command!",
Expand All @@ -182,43 +185,50 @@ client.setMaxListeners(20);
const moreInfoEmbed = new MessageEmbed()
.setColor("#0099ff") // Set color to blue
.setTitle("More Info")
.setURL("https://pogy.xyz/invite")
.setURL(`${process.env.AUTH_DOMAIN}/invite`)
.setDescription(
"Chaotic is a discord bot with a lot of features. You can invite Pogy to your server by clicking the button below",
`${config.botName} is a discord bot with a lot of features. You can invite ${config.botName} to your server by clicking the button below.`,
)
.setFooter("Pogy", "https://pogy.xyz/assets/images/pogy.png") // Set footer with text and icon
.setFooter(
`${config.botName}`,
`${process.env.AUTH_DOMAIN}/assets/images/pogy.png`,
) // Set footer with text and icon
.addFields(
{ name: "Invite Pogy", value: "https://pogy.xyz/invite", inline: false },
{
name: `Invite ${config.botName}`,
value: `${process.env.AUTH_DOMAIN}/invite`,
inline: false,
},
{ name: "Support Server", value: "https://discord.gg/pogy", inline: false },
{
name: "Vote Pogy",
name: `Vote ${config.botName}`,
value: "https://top.gg/bot/880243836830652958/vote",
inline: false,
},
);
const levelupbutton = new MessageEmbed()
.setColor(color.blue)
.setTitle("Level Up")
.setFooter("Pogy", "https://pogy.xyz/assets/images/pogy.png")
.setFooter(`${config.botName}`, `${process.env.AUTH_DOMAIN}/assets/images/pogy.png`)
.setDescription(
`Hm this doesnt seem to do much. But you can click it anyways`,
`Hmmm... This doesnt seem to do much, but you can click it anyways.`,
)
.setURL("https://pogy.xyz/invite");
.setURL(`${process.env.AUTH_DOMAIN}/invite`);

const invitebutton = new MessageActionRow().addComponents(
new MessageButton()
.setLabel("Invite Pogy")
.setLabel(`Invite ${config.botName}`)
.setStyle("LINK")
.setURL("https://394wkx-3000.csb.app//invite"),
.setURL(`${process.env.AUTH_DOMAIN}/invite`),
);

const infobutton = new MessageEmbed()
.setTitle(`Info`)
.setDescription(
" hello there poger. If you want more info on this bot you can check out the github repo or join the support server",
"Hello there pogger. If you want more info on this bot, you can check out the github repo or join the support server",
)
.setURL("https://github.com/hotsu0p/Pogy/")
.addField("Github Repo", "https://github.com/hotsu0p/Pogy/");
.setURL("https://github.com/eYuM-coder/MEE8/")
.addField("Github Repo", "https://github.com/eYuM-coder/MEE8/");

client.on("interactionCreate", async (interaction) => {
try {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/alt detector/aaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = class extends Command {
choices.join(", ")
)}`
)
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setTimestamp()
.setColor("RED"),
],
Expand All @@ -61,7 +61,7 @@ module.exports = class extends Command {
choices.join(", ")
)}`
)
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setTimestamp()
.setColor("RED"),
],
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = class extends Command {
message.client.emoji.success
} ${language.aactionSuccess.replace("{action}", args[0])}`
)
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setTimestamp()
.setColor("RED"),
],
Expand All @@ -116,7 +116,7 @@ module.exports = class extends Command {
message.client.emoji.success
} ${language.aactionSuccess.replace("{action}", args[0])}`
)
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setTimestamp()
.setColor("RED"),
],
Expand Down
2 changes: 1 addition & 1 deletion src/commands/applications/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ module.exports = class extends Command {
.setColor(message.client.color.green)
.setFooter({ text: "Powered by Pogy.xyz" })
.setDescription(
`${message.client.emoji.success} | ${language.applaydone} **${message.guild.name}** [by clicking here](https://394wkx-3000.csb.app//apply/${message.guild.id})`
`${message.client.emoji.success} | ${language.applaydone} **${message.guild.name}** [by clicking here](${process.env.AUTH_DOMAIN}/apply/${message.guild.id})`
),
],
})
Expand Down
2 changes: 1 addition & 1 deletion src/commands/applications/approve.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = class extends Command {
new discord.MessageEmbed()
.setColor(message.guild.me.displayHexColor)
.setDescription(
`${message.client.emoji.fail} | ${language.approvepremium}.\n\n[Check Premium Here](https://394wkx-3000.csb.app//premium)`
`${message.client.emoji.fail} | ${language.approvepremium}.\n\n[Check Premium Here](${process.env.AUTH_DOMAIN}/premium)`
),
],
});
Expand Down
2 changes: 1 addition & 1 deletion src/commands/applications/decline.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = class extends Command {
new discord.MessageEmbed()
.setColor(message.guild.me.displayHexColor)
.setDescription(
`${message.client.emoji.fail} | ${language.approvepremium}.\n\n[Check Premium Here](https://394wkx-3000.csb.app//premium)`
`${message.client.emoji.fail} | ${language.approvepremium}.\n\n[Check Premium Here](${process.env.AUTH_DOMAIN}/premium)`
),
],
});
Expand Down
8 changes: 4 additions & 4 deletions src/commands/config/autoresponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}autoResponse <command-name> <text-reply>\`\n\n${language.example} \`${prefix}autoResponse ping pong\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand All @@ -58,7 +58,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}autoResponse <command-name> <text-reply>\`\n\n${language.example} \`${prefix}autoResponse ping pong\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand All @@ -84,7 +84,7 @@ module.exports = class extends Command {
new MessageEmbed()
.setColor(message.guild.me.displayHexColor)
.setDescription(
`${message.client.emoji.fail} Auto Response Limit Reached **(10)**\n\n[Upgrade Premium Here for unlimited commands](https://394wkx-3000.csb.app//premium)`
`${message.client.emoji.fail} Auto Response Limit Reached **(10)**\n\n[Upgrade Premium Here for unlimited commands](${process.env.AUTH_DOMAIN}/premium)`
),
],
});
Expand Down Expand Up @@ -112,7 +112,7 @@ module.exports = class extends Command {
`**${language.cc3}** ${name}\n\nDelete the following auto response using \`${prefix}deleteresponse <command-name>\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand Down
18 changes: 9 additions & 9 deletions src/commands/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,47 @@ module.exports = class extends Command {
.setTitle(`${language.serversettings1}`)
.addField(
`Main Settings`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id})`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id})`,
true,
)
.addField(
`Welcome & Leave`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/welcome)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/welcome)`,
true,
)
.addField(
`Logging`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/logging)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/logging)`,
true,
)
.addField(
`Autorole`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/autorole)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/autorole)`,
true,
)
.addField(
`Alt Detector`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/altdetector)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/altdetector)`,
true,
)
.addField(
`Tickets`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/tickets)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/tickets)`,
true,
)
.addField(
`Suggestions`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/Suggestions)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/Suggestions)`,
true,
)
.addField(
`Server Reports`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/reports)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/reports)`,
true,
)
.addField(
`Automod`,
`[\`Click here\`](https://394wkx-3000.csb.app/dashboard/${message.guild.id}/automod)`,
`[\`Click here\`](${process.env.AUTH_DOMAIN}/dashboard/${message.guild.id}/automod)`,
true,
)

Expand Down
8 changes: 4 additions & 4 deletions src/commands/config/customcommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}customcommand <command-name> <text-reply>\`\n\n${language.example} \`${prefix}customcommand ping pong\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand All @@ -57,7 +57,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}customcommand <command-name> <text-reply>\`\n\n${language.example} \`${prefix}customcommand ping pong\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand Down Expand Up @@ -88,7 +88,7 @@ module.exports = class extends Command {
new MessageEmbed()
.setColor(message.guild.me.displayHexColor)
.setDescription(
`${message.client.emoji.fail} custom Command Limit Reached **(10)**\n\n[Upgrade Premium Here for unlimited commands](https://394wkx-3000.csb.app//premium)`
`${message.client.emoji.fail} custom Command Limit Reached **(10)**\n\n[Upgrade Premium Here for unlimited commands](${process.env.AUTH_DOMAIN}/premium)`
),
],
});
Expand Down Expand Up @@ -116,7 +116,7 @@ module.exports = class extends Command {
`**${language.cc3}** ${name}\n\nDelete the following command using \`${prefix}deletecommand <command-name>\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" })
.setFooter({ text: `${process.env.AUTH_DOMAIN}` })
.setColor(message.guild.me.displayHexColor),
],
});
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/deletecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}deletecommand <command-name>\`\n\n${language.example} \`${prefix}deletecommand pog\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" }),
.setFooter({ text: `${process.env.AUTH_DOMAIN}` }),
],
})
.setColor(message.guild.me.displayHexColor);
Expand Down Expand Up @@ -69,7 +69,7 @@ module.exports = class extends Command {
.setTitle(`${message.client.emoji.success} Delete Command`)
.setDescription(`${language.deletecmd1} **${name}**`)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" }),
.setFooter({ text: `${process.env.AUTH_DOMAIN}` }),
],
});
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/config/deleteresponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = class extends Command {
`${language.properusage} \`${prefix}deleteresponse <command-name>\`\n\n${language.example} \`${prefix}deleteresponse pog\``
)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" }),
.setFooter({ text: `${process.env.AUTH_DOMAIN}` }),
],
})
.setColor(message.guild.me.displayHexColor);
Expand Down Expand Up @@ -71,7 +71,7 @@ module.exports = class extends Command {
)
.setDescription(`${language.deletecmd1} **${name}**`)
.setTimestamp()
.setFooter({ text: "https://394wkx-3000.csb.app//" }),
.setFooter({ text: `${process.env.AUTH_DOMAIN}` }),
],
});
} else {
Expand Down
Loading

0 comments on commit 9d93342

Please sign in to comment.