This is a discord utility bot repository for the oldschoolbot project
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)
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
To run the bot, you need the following things first: Git, NodeJS v18+, Postgres or MongoDB and a discord bot account.
- Head to Discord Developers and create an application.
- Once created, click into your Application.
- Copy and store the Application ID, you'll need this later on.
- Create a Bot on the Bot tab. Copy and store the token for your bot, you'll need this later on.
- Ensure your bot has
Privileged Gateway Intents > Message Content Intent
enabled. - 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)
- Clone the repository:
git clone https://github.com/LuxrayElite/oldschool-utilities.git
- Change into the new directory:
cd oldschool-utilities
- If utilising postgres change to the postgres branch using
git checkout postgres
- Install the yarn dependency:
npm install --global yarn
- Make a .env file copy from the example
cp .env.example .env
- Update this new
.env
file:- Input your bot token you retrieved earlier into
TOKEN
- Change the prefix to whatever you wish with PREFIX
- Input your username, password, and schema names into
DATABASE_URL
using the formatpostgresql://USER:PASSWORD@HOST:PORT/DATABASE
- If using mongoDB utilise the format
mongodb+srv://USER:PASSWORD@CLUSTERNAME.NODE.mongodb.net/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
- Input your bot token you retrieved earlier into
- Run
yarn
thenyarn install
- Run
npx prisma generate
to generate the Prisma client files. - Run
npx prisma db push
to create the tables on the database referenced in .env - Run
yarn build
- then runyarn start
.