diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..54a5a11 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +TOKEN="EVERYTHINGS SO FCKED AND IM TIRED OF BEING SCARED" +OWNERID="SO LETS GET OUT AND FCK UP EQUESTRIA" +# Do !!NOT!! share this file once filled out with anybody, Doing so can leak your Bot Token which will give anyone access to your bot! diff --git a/README.md b/README.md index 89c204d..fced111 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Node.JS: 16 npm: 6.14 # Let's get this ~~party~~ bot started! For first time start up, You will need to run ``npm install`` to install the needed npm packages. -Afterwards fill out the ``config-example.json`` and rename it to ``config.json``, then just run ``node start.js`` (or ``./start.js`` on Linux)! +Afterwards fill out the ``.env.example`` and ``config-example.json`` and then rename them to ``.env`` and ``config.json``, then just run ``node start.js`` (or ``./start.js`` on Linux)! +
⚠️ If you don't specify the Owner ID, Some commands such as the bot controls will be unusable! # Support -Support is available on the [Discord Server!](discord.gg/5nQtMNpf43), or @ me on [Twitter!](twitter.com/IDeleteSystem64); +Support is available on the [Discord Server!](discord.gg/5nQtMNpf43), or @ me on [Twitter!](twitter.com/IDeleteSystem64) diff --git a/commands.md b/commands.md deleted file mode 100644 index 6d5e7db..0000000 --- a/commands.md +++ /dev/null @@ -1,28 +0,0 @@ -# Anitrox Command List -<> = Optionable -
-[] = Required - -|Command|Arguments |Description | -|-------|----------|------------| -|Help |none |Help? Help!!| -|8ball |[Question]|Ask a question, Any question! | -|avatar |\ |Get a users beautiful avatar | -|bonk |[Member] | Bonk, no horny. | -|cheese |\| Cheese.| -|cuddle |[Member] | Cuddle someone! | -|choose |[Option1]
[Option2]
[and so on] | Choose from a list of choices, as many as you want! -|hug |[Member] | Hug someone! | -|info |none | Information about the bot and host. -|invite |none | Invite Anitrox to your server! -|kiss |[Member] | Kiss someone! | -|leskiss|[Member] | Lesbain kiss (Suggested by Emi) -|lick |[Member] | Did you just lick me!? -|nom |[Member] | Nom someone or something -|opensource|none | Source code for Anitrox -|pat |[Member] | Pat someone! -|ping |none | Ping Elon Musk! or Mars! nah jk, Discord. -|poke |[Member] | Poke someone! -|slap |[Member] | Slap someone :( -|snuggle|[Member] | Snuggle someone! -|uinfo |[Member] | Information about an user diff --git a/commands/eval.js b/commands/eval.js index c7a88bc..20b82d5 100644 --- a/commands/eval.js +++ b/commands/eval.js @@ -21,7 +21,7 @@ module.exports = { }, handle (client, config, user, code) { - if (user.id === config.ownerID) { + if (user.id === process.env.OWNERID) { try { const evaled = inspect(eval(code)); // await message.channel.send(evaled, { code: 'xl' }); diff --git a/commands/help.js b/commands/help.js index 77e7377..6b98b22 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,28 +1,44 @@ +const { Constants } = require('discord.js'); + module.exports = { name: require('path').parse(__filename).name, description: 'Get help on anything from commands, to what the bot does! just not your homework..', options: [{ - name: '', + name: 'help', description: 'View Information about this command', - required: false + required: false, + type: Constants.ApplicationCommandOptionTypes.STRING }], async parseMessage (client, config, message, args) { - await message.channel.send(this.handle(client, config, message.author, args)); + await message.channel.send(this.handle(client, config, message.author, args[0])); }, async parseInteraction (client, config, interaction) { - await interaction.reply(this.handle(client, config, interaction.user)); + await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('help'))); }, - handle (client, config, user, args) { - if (!args[0]) { - return client.generateErrorMessage('Note to self: Design default help embed.', user.displayAvatarURL()); + handle (client, config, user, command) { + if (!command) { + return { + embeds: [{ + title: `:question: SEYMOUR! THE ${client.user.username} IS ON FIRE!`, + description: `Run ${config.prefix}help for more information on each command.`, + footer: { + icon_url: user.displayAvatarURL(), + text: config.footerTxt + }, + fields: [ + { name: 'Commands', value: client.commands.map(command => command.name).join('\n') } + ] + }] + }; } - const cmdName = args[0].toLowerCase(); + // const cmdName = args[0].toLowerCase(); + const cmdName = command; const cmd = client.commands.get(cmdName); - + console.log(cmd.options.map(option => option.required)); if (!cmd) { return client.generateErrorMessage(`${cmdName} is not a valid command! Run ${config.prefix}help for a command list.`); } @@ -39,8 +55,8 @@ module.exports = { { name: 'Command Name', value: `${cmdName}`, inline: true }, { name: 'Command Description', value: cmd.description, inline: true }, { name: 'Command Options', value: cmd.options.map(option => option.name).join('\n') || 'None', inline: true }, - { name: 'Command Option Description', value: cmd.options.map(option => option.description).join('\n') || 'None', inline: true }, - { name: 'Option Legend', value: '[Option] REQUIRED\n