Skip to content

This is a discord utility bot repository for the oldschoolbot project

License

Notifications You must be signed in to change notification settings

LuxrayElite/oldschool-utilities

Repository files navigation

oldschool-utilities

This is a discord utility bot repository for the oldschoolbot project

Features

Tracking time for your trip to return using relative time. Tracking your slayer task (Currently only operates of gettings tasks via autoslay) Tracking farming timers (Although all are not yet displayed) Tracking whether or not you have a clue (Patron or non-patron) (Doesnt tell which clue you have) Tracks Tears of guthix timer. Allows you to check masses going on at the moment (This list complies all raids going on within servers the bot is active)

With the exception of trip timer and raid tracking, the bot will not display this information until you actively participate (eg you never do herb runs or birdhouses it wont be displayed)

Commands

Currently there are only three commands present within the bot:

track - In combination with your minion name the bot will start tracking your minion (You will have to redo this command if you change the name) t - Posts an embed of currently active timers/tracked data on your account cm - Posts a current list of active raids going on

Setting up the bot to run locally for contributing

To run the bot, you need the following things first: Git, NodeJS v18+, Postgres or MongoDB and a discord bot account.

Setting up a Discord Bot

  1. Head to Discord Developers and create an application.
  2. Once created, click into your Application.
  3. Copy and store the Application ID, you'll need this later on.
  4. Create a Bot on the Bot tab. Copy and store the token for your bot, you'll need this later on.
  5. Ensure your bot has Privileged Gateway Intents > Message Content Intent enabled.
  6. Invite your bot to your server via this URL. Be sure to input your Application ID into the URL. [https://discord.com/api/oauth2/authorize?client_id=<INSERT APPLICATION ID HERE>&permissions=329728&scope=bot](https://discord.com/api/oauth2/authorize?client_id=<INSERT APPLICATION ID HERE>&permissions=329728&scope=bot)

Setting up your environment

  1. Clone the repository: git clone https://github.com/LuxrayElite/oldschool-utilities.git
  2. Change into the new directory: cd oldschool-utilities
  3. If utilising postgres change to the postgres branch using git checkout postgres
  4. Install the yarn dependency: npm install --global yarn
  5. Make a .env file copy from the example cp .env.example .env
  6. Update this new .env file:
    1. Input your bot token you retrieved earlier into TOKEN
    2. Change the prefix to whatever you wish with PREFIX
    3. Input your username, password, and schema names into DATABASE_URL using the format postgresql://USER:PASSWORD@HOST:PORT/DATABASE
    4. If using mongoDB utilise the format mongodb+srv://USER:[email protected]/PROJECTNAME when clicking on the connect button on mongodb atlas it will give you a similarly formated url, you just have to add the project name
  7. Run yarn then yarn install
  8. Run npx prisma generate to generate the Prisma client files.
  9. Run npx prisma db push to create the tables on the database referenced in .env
  10. Run yarn build - then run yarn start.

About

This is a discord utility bot repository for the oldschoolbot project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published