├── .eslintrc.json ├── .gitignore ├── .prettierrc ├── README.md ├── docs ├── docs.md └── startup.md ├── package.json ├── src ├── autoUpdate │ └── autoUpdate.ts ├── commands │ ├── commandClasses.ts │ ├── message │ │ └── translate.ts │ ├── slash │ │ ├── alias.ts │ │ ├── contribute.ts │ │ ├── craft.ts │ │ ├── help.ts │ │ ├── info.ts │ │ ├── lavaMath.ts │ │ ├── ping.ts │ │ ├── roll.ts │ │ └── wiki.ts │ └── user │ │ └── userInfo.ts ├── config │ ├── autoUpdateOptions.ts │ └── clientOptions.ts ├── database │ ├── mongo.ts │ └── schemas.ts ├── ecosystem.config.ts ├── events │ ├── devCommands.ts │ ├── guildSetup.ts │ ├── leaveGuildEvent.ts │ ├── messageCommandHandler.ts │ ├── messageHandler.ts │ ├── ready.ts │ ├── slashCommandHandler.ts │ └── userCommandHandler.ts ├── index.ts ├── registerGlobalCommands.ts ├── repositories │ ├── aliasRepository.ts │ ├── itemRepository.ts │ └── monsterRepository.ts ├── resources │ ├── aliases.ts │ ├── data │ │ ├── ignoreEnemies.json │ │ ├── items.ts │ │ └── monsters.ts │ └── formulas.ts ├── scripticus.ts ├── types │ └── types.ts └── utils │ ├── logger.ts │ └── utils.ts ├── tsconfig.base.json ├── tsconfig.json ├── tsconfig.production.json └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | // { 2 | // "extends": "eslint:recommended", 3 | // "env": { 4 | // "node": true, 5 | // "es6": true 6 | // }, 7 | // "parserOptions": { 8 | // "ecmaVersion": 2019 9 | // }, 10 | // "rules": { 11 | // "brace-style": ["error", "stroustrup", { "allowSingleLine": true }], 12 | // "comma-dangle": ["error", "always-multiline"], 13 | // "comma-spacing": "error", 14 | // "comma-style": "error", 15 | // "curly": ["error", "multi-line", "consistent"], 16 | // "dot-location": ["error", "property"], 17 | // "handle-callback-err": "off", 18 | // "max-nested-callbacks": ["error", { "max": 4 }], 19 | // "max-statements-per-line": ["error", { "max": 2 }], 20 | // "no-console": "off", 21 | // "no-empty-function": "error", 22 | // "no-floating-decimal": "error", 23 | // "no-inline-comments": "error", 24 | // "no-lonely-if": "error", 25 | // "no-multi-spaces": "error", 26 | // "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], 27 | // "no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }], 28 | // "no-trailing-spaces": ["error"], 29 | // "no-var": "error", 30 | // "object-curly-spacing": ["error", "always"], 31 | // "prefer-const": "error", 32 | // "quotes": ["error", "single"], 33 | // "semi": ["error", "always"], 34 | // "space-before-blocks": "error", 35 | // "space-before-function-paren": ["error", { 36 | // "anonymous": "never", 37 | // "named": "never", 38 | // "asyncArrow": "always" 39 | // }], 40 | // "space-in-parens": "error", 41 | // "space-infix-ops": "error", 42 | // "space-unary-ops": "error", 43 | // "spaced-comment": "error", 44 | // "yoda": "error" 45 | // } 46 | // } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Scratch file 2 | scratch/ 3 | scratch.js 4 | 5 | # vscode config files 6 | .vscode/ 7 | 8 | # Logs 9 | logs 10 | *.log 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | lerna-debug.log* 15 | 16 | # Diagnostic reports (https://nodejs.org/api/report.html) 17 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 18 | 19 | # Runtime data 20 | pids 21 | *.pid 22 | *.seed 23 | *.pid.lock 24 | 25 | # Directory for instrumented libs generated by jscoverage/JSCover 26 | lib-cov 27 | 28 | # Coverage directory used by tools like istanbul 29 | coverage 30 | *.lcov 31 | 32 | # Dependency directories 33 | node_modules/ 34 | 35 | # TypeScript cache 36 | *.tsbuildinfo 37 | 38 | 39 | # Optional eslint cache 40 | .eslintcache 41 | 42 | # dotenv environment variables file 43 | .env 44 | .env.test 45 | 46 | # parcel-bundler cache (https://parceljs.org/) 47 | .cache 48 | 49 | # Typescript build directory 50 | dist 51 | 52 | .vscode/launch.json 53 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "tabWidth": 2, 4 | "printWidth": 100 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Scripticus 2 | 3 | A Discord Bot for the Legends of Idleon [Discord Server](https://discord.com/invite/idleon)! 4 | 5 | ## Current commands: 6 | 7 | - `alias` 8 | - Show all the possible aliases for a word. (Special thanks to AlienC4!) 9 | - `wiki` 10 | - Search the wiki! Returns a url. 11 | - `math` 12 | - Helpful math formulas that LavaFlame2 uses in game 13 | - `help` 14 | - Tell you information on all commands or a specific command 15 | - `craft` 16 | - See how much it costs total to craft an item! (Special thanks to Granttank!) 17 | - `contribute` 18 | - Informational command with links to the GitHub 19 | - `info` 20 | - Provides information on items or monsters from Legends of Idleon! 21 | 22 | ## Want to follow our progress? 23 | Check out the state of the project here! [To-Do List](https://github.com/Deerjump/Scripticus/projects/1) 24 | 25 | 26 | # Want to help? 27 | - Make a suggestion through [Issues](https://github.com/Deerjump/Scripticus/issues) (Note: you'll need a github account to do this) 28 | - Run through some tutorials or read the documentation for the discord.js API: [Discord.js](https://discord.js.org/) 29 | - Check out our [guide](./docs/startup.md) to get started with running your test version locally 30 | -------------------------------------------------------------------------------- /docs/docs.md: -------------------------------------------------------------------------------- 1 | # WIP 2 | -------------------------------------------------------------------------------- /docs/startup.md: -------------------------------------------------------------------------------- 1 | # THIS IS CURRENTLY OUT OF DATE!!! 2 | 3 | # Running your own test version of the bot 4 | 1. Download the code 5 | 2. You'll need to go [here](https://discord.com/developers/applications) 6 | 3. Create a new `Application`. 7 | - You'll also need the `Client ID` on the "General Information" tab in order to add the bot to your server using this template link: 8 | - `https://discord.com/oauth2/authorize?client_id=CLIENT-ID_HERE&scope=bot` 9 | - [Discord.js Help Docs](https://discordjs.guide/preparations/adding-your-bot-to-servers.html#bot-invite-links) 10 | 4. Then in the `Bot` tab, copy the token for the step below. 11 | 12 | 5. Create a `.env` file in the main directory as seen [below](#example-env) 13 | - If you need to use a database, you'll need to create your own MongoDB to use. 14 | - You'll place your credentials in the `.env` and you'll need to configure [connection.js](../mongo/connection.js) with your database url. 15 | 16 | ## Example .env 17 | ```js 18 | // Your Discord bot's token 19 | TOKEN=YOUR_TOKEN_HERE 20 | 21 | /* 22 | REQUIRED: The database(currently MongoDB) is used for guild settings and the NotifyCommand. 23 | This file is not commited to GitHub and therefore safe to keep 24 | your username, password and token safe. 25 | */ 26 | DATABASE_URL=DATABASE_ 27 | ``` 28 | 6. Make sure you have [node.js](https://nodejs.org/) installed 29 | 7. You should navigate to the `root directory` of the project and run: `npm install` in your terminal 30 | 8. After that is done installing your necessary dependencies, you have a couple options: 31 | - Running the main `bot.js` file with: `node bot.js` 32 | 33 | OR 34 | 35 | - You can also start up the bot by running the command `npm start`, which will start up the bot using [pm2](https://pm2.io/docs/plus/overview/) 36 | - Also see [package.json](../package.json) for the other scripts available through `npm run