This is the source code for the ex official bot of the Gacha Life Cringe Discord!
This bot is very modular, every command is a nodejs module as you can see in dirrectory commands
the basic template for creating a command is
commands/commandName.js
module.exports = {
name: 'commandName',
description: 'Desc. Of said command',
execute(message, args, Discord, client ,version) {
//code goes here
},
};
every module is passed down FIVE arguments, the message, arguments, the Discord.js Library, client, and version this is made to make it easy to write commands for the bot
Deployment is quite easy, all you require is an ubuntu server, and it's architecture to be supported by node.js, here is how you deloy
- curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
- sudo apt install -y nodejs
- sudo npm i -g pm2
- mkdir /etc/cringebot/cringe-bot-v2/
- chmod 777 /etc/cringebot/cringe-bot-v2/
- cd /etc/cringebot/cringe-bot-v2/
- git clone https://github.com/Able-Times/cringe-bot69420
- cd cringe-bot69420
- npm install
- sudo pm2 start index.js
Credit to @NyleCohen and @Able-Times