IRIS is a Discord bot that is focused on fun and utlities, as well as helping people understand TypeScript.
Table of Contents
Welcome to the official repository for IRIS, a Discord bot focused on fun and utilities with the purpose of helping people understand TypeScript. IRIS stands for Intelligent Response Interface System.
IRIS is coded from scratch and with ❤️ by the Incoverse team.
There are many frameworks/libraries used to create this project. Here are a few of them.
Follow these steps to get a copy of IRIS up and running on your machine!
- Node.JS (latest)
- git
- VSCode (optional)
- MongoDB Compass (optional)
-
Clone the repo
git clone https://github.com/Incoverse/IRIS
-
Navigate to the project directory
cd IRIS
-
Install TypeScript using npm
npm i -g typescript
-
Create your MongoDB server.
This step is optional but recommended. If you wish to use file storage instead, skip to step 8.
If you wish to do it on your computer, follow this guide (Windows). For other operating systems, try googling about how to create a MongoDB server for that specific operating system. If done on the machine where IRIS will be running, your "mongoDBServer" in config.jsonc will be "localhost".
-
Create the following databases on your MongoDB server: (MongoDB Compass is recommended to do this much simpler)
- IRIS
- IRIS_DEVELOPMENT
It will most likely force you to create a collection with the database, enter something temporary that you will delete later when IRIS is done with configurating the database
-
Create 2 users. 1 for production, and 1 for development
use admin db.createUser({user:"iris",pwd:"SomethingThatIsVerySecure", roles: [{role:"dbAdmin", db: "IRIS"},{role:"readWrite", db:"IRIS"}]}) db.createUser({user:"irisdev",pwd:"SomethingThatIsAlsoVerySecure", roles: [{role:"dbAdmin", db: "IRIS_DEVELOPMENT"},{role:"readWrite", db:"IRIS_DEVELOPMENT"}]})
It is recommended to keep the pre-set usernames as there is 1 internal check to make sure you don't run IRIS in production with development credentials and vice-versa If you truly want to change the username, go here locally and edit the production username to your one.
-
Customize
config.jsonc
to your needs, check comments for guidance. -
Install any missing packages
npm install
-
Create your discord bot.
- Create a new Discord Application
- Go to the
OAuth2
section and write down your client ID and secret - Staying on the same page, add the following redirect URI
http://localhost:7380
(Discord may add a slash at the end, make sure to remove it) - Go to the
Bot
section and turn on all of the intents and write down your bot token (click 'Reset Token' to create the token)
-
Create a
.env
file in the project's root directory and replace the following values to the ones you've written down:<bot-token>
,<client-id>
,<client-secret>
,<MongoDB username>
,<MongoDB password>
. Set DEVELOPMENT to YES or NO depending on what you want to do.TOKEN="<bot-token>" DBUSERNAME="<MongoDB username>" # Remove if using file storage DBPASSWD="<MongoDB password>" # Remove if using file storage DEVELOPMENT="<YES/NO>" cID="<client-id>" cSecret="<client-secret>"
-
Now it's time to add your bot to your server. Use the following URL, but replace
[client-id]
with the client ID you wrote down: https://discord.com/api/oauth2/authorize?client_id=[client-id]&permissions=328866327553&scope=bot%20applications.commands
Follow Server Creation Notes to create your server.
- Write
npm run CnR
in your cmd/terminal (CnR = Compile & Run) and click Enter. - When a link is displayed in the console, open it in your browser and authorize it. This will allow IRIS to properly set up command permissions (defined in
config.jsonc
).
Note: You can skip this by using the following server template: https://discord.new/b4vRrmwJB5kG
The following channels are required for IRIS to function as intended: birthdays
, open-a-ticket
.
The following roles are required for IRIS to function as intended: New Member
, It's my birthday!
.
Type '/' and all IRIS commands will show up
- Create a fork of this repository
- Clone the fork
git clone https://github.com/YOUR_USERNAME/IRIS
- Continue from step 3 in Installation
- Make changes
- Submit a pull request!
Distributed under the GPL-3.0 license. See LICENSE for more information.
For any questions or concerns, don't hesitate to contact Inimi @theinimi on Discord or via email.