Skip to content
/ IRIS Public

IRIS (Intelligent Response Interface System) is a Discord bot created by Inimi

License

Notifications You must be signed in to change notification settings

Incoverse/IRIS

Repository files navigation


Logo

IRIS (Intelligent Response Interface System)

IRIS is a Discord bot that is focused on fun and utlities, as well as helping people understand TypeScript.


Table of Contents
  1. About The Project
  2. Getting Started
  3. Server Creation Notes
  4. Usage
  5. Contributing
  6. License
  7. Contact

About The Project

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.

Built With

There are many frameworks/libraries used to create this project. Here are a few of them.

  • Discord
  • .ENV
  • Express
  • MongoDB
  • chalk

(Go to the top)

Getting Started

Follow these steps to get a copy of IRIS up and running on your machine!

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/Incoverse/IRIS
  2. Navigate to the project directory

    cd IRIS
  3. Install TypeScript using npm

    npm i -g typescript
  4. 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".

  5. 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

  6. 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.

  7. Customize config.jsonc to your needs, check comments for guidance.

  8. Install any missing packages

    npm install
    
  9. 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)
  10. 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>"
    
  11. 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.

  1. Write npm run CnR in your cmd/terminal (CnR = Compile & Run) and click Enter.
  2. 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).

Server Creation Notes

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!.

Usage

Type '/' and all IRIS commands will show up

(Go to the top)

Contributing

  1. Create a fork of this repository
  2. Clone the fork
    git clone https://github.com/YOUR_USERNAME/IRIS
  3. Continue from step 3 in Installation
  4. Make changes
  5. Submit a pull request!

License

Distributed under the GPL-3.0 license. See LICENSE for more information.

Contact

For any questions or concerns, don't hesitate to contact Inimi @theinimi on Discord or via email.


(Go to the top)