Simpleboy353 / REAPER-2.0

A multi-purpose discord bot made using Discord.js V14. Includes Logging, Welcomer, Slash Commands, Menu based Help Command and so much more!
GNU General Public License v3.0
331 stars 226 forks source link

Dockerize app #170

Closed alexx855 closed 2 years ago

alexx855 commented 2 years ago

Hello, i just did this changes to myself, mainly bc i didn't want to signup and create and account / server on the mongodb cloud platform, hope its helpful for someone, thanks for you job :)

NotMinhDucGamingTV commented 2 years ago

`const Discord = require("discord.js"); require('dotenv').config(); const config = process.env;

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] });

const prefix = "!";

client.on("messageCreate", function (message) { if (message.author.bot) return; if (!message.content.startsWith(prefix)) return;

const commandBody = message.content.slice(prefix.length);
const args = commandBody.split(' ');
const command = args.shift().toLowerCase();

if (command === "ping") {
    const timeTaken = Date.now() - message.createdTimestamp;
    message.reply(`Pong! This message had a latency of ${timeTaken}ms.`);
}

else if (command === "sum") {
    const numArgs = args.map(x => parseFloat(x));
    const sum = numArgs.reduce((counter, x) => counter += x);
    message.reply(`The sum of all the arguments you provided is ${sum}!`);
}

}); ` what is this?

alexx855 commented 2 years ago

Sorry i forgot to delete that file, i used it to test only, i was having some random errors on windows 11 so i decided to move to docker and i used that .js file initially to do my first test.

Simpleboy353 commented 2 years ago

Updated the repository to v14 :'(