Welcome to Sanity! This bot is designed to assist our interactions within the Partly Sane Skies Development Team.
- NodeJS Installation: Ensure you have NodeJS installed, preferably version 16.11.0 or newer. The LTS version of 20.10.0 is recommended.
- Clone Repository: Clone this repository to your local machine.
- Dependency Installation: In the repository folder, run
npm start
in the command prompt. This will install the necessary dependencies. After completion, the bot will launch usingnode main.js
.
Currently, the .env
file needs 6 elements: TOKEN
, GITHUB_TOKEN
, OWNER
, REPO
, SERVER_URL
, SERVER_STATUS_CHANNEL_ID
& DAILY_FUNFACT_CHANNEL_ID
Follow these steps to obtain the Bot Token:
- Head to the Developer Portal.
- Create a new application, copy the APPLICATION ID.
- In the "Bot" tab, reset the token and copy it.
- Enable "Presence Intent," "Server Members Intent," & "Message Content Intent."
- In your project, create a .env file, add TOKEN=your_token (replace with your token).
For GitHub API access in announcement.js
and mods.js
:
- Open Developer Settings.
- Generate a new token with the repo scope.
- Copy the generated token.
- In
.env
, addGITHUB_TOKEN=your_token
.
Ensure your repository aligns with the specified structure for mods.json and main_menu.json. Examples can be found here.
Add two more lines to your .env
file:
OWNER=your_github_username
REPO=your_repository_name
If using Partly Sane Cloud, include SERVER_URL
, SERVER_STATUS_CHANNEL_ID
and DAILY_FUNFACT_CHANNEL_ID
properties in your .env
.
Now your .env file should look like this:
TOKEN=your_bot_token
GITHUB_TOKEN=your_github_token
OWNER=your_user_name
REPO=your_repo
SERVER_URL=server_url
SERVER_STATUS_CHANNEL_ID=channel_id
DAILY_FUNFACT_CHANNEL_ID=channel_id
- Visit the Permission Calculator
- Copy your APPLICATION ID into "Client ID."
- Select appropriate permissions (Administrator is recommended).
- Click the generated link, follow the Discord invite process, and voilà, you can use the bot now!