Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Latest commit

 

History

History
121 lines (82 loc) · 7.39 KB

README-OLD.md

File metadata and controls

121 lines (82 loc) · 7.39 KB

DEPRECATED

See README.md.

Atlas

License

Yet another Discord bot that tries to do everything - atlasbot.xyz

This is all the code that runs the bot portion of Atlas. The dashboard, API and other secret sauce will remain closed source for now. Contributions are welcome.

Prerequisites

* Required for development. If you're self-hosting, you can skip these requirements.

Installation

Linux is recommended, but Docker means macOS, Windows and more or less anything that runs Docker will work. For development, anything that runs Node.js and Docker will work.

Self-hosting

  1. Install Docker and docker-compose

  2. Clone this repo

    git clone https://github.com/atlasbot/bot.git
  3. Open a terminal in the cloned folder

  4. Copy .env.example to .env and fill in the required env variables. See below for what most do. Google is your friend.

  5. Start the bot with docker-compose up -d. If you did everything right, then congratulations - you now have your own instance of Atlas.

Development

  1. Install Docker, docker-compose and Node.js

  2. Clone this repo

    git clone https://github.com/atlasbot/bot.git
  3. Open a terminal in the cloned folder

  4. Run npm install to install dependencies

  5. Copy .env.example to .env and replace any variables you would like. Setting NODE_ENV to development will enable extra features and help debugging things.

  6. Start Lavalink, Redis and Mongo via docker-compose up -d mongo lavalink redis

    If you are using docker-compose to host these services, you can leave the defaults in .env.example for those services and it should be gucci.

  7. Start the bot with npm run dev

  8. Start breaking things. Once you save a file change, the bot will restart with the changes. Do npm run start to start the bot without watching files.

Environment Variables

Name Description
PREFIXES A list of all prefixes the bot will listen for by default, split by commas. @mention will be replaced with the bot's mention.
DEFAULT_PREFIX The default prefix for Atlas to use. By default, this is "a!"
NODE_ENV The environment the bot is in, should be "production" or "development".
TOKEN The bot token to login with.
MONGO_URI A MongoDB Connection URI.
VERBOSE Whether or not to use verbose logging (e.g, logging commands) - you'll probably want this disabled in a production environment.
OWNER The bot's owner ID. For security, this should only be set to user ID's that already have direct access to the host server.
DEFAULT_LANG The default language to use for everything. Valid languages are in /locales
LAVALINK_NODES An array of Lavalink nodes. See example for more info.
OMDBAPI_KEY * An OMDBAPI key.
GOOGLE_CX * A Google CX key for custom searches. Google is your friend.
GOOGLE_KEY * A Google key for custom searches. See above.
REDIS_HOST * The host for Redis.
REDIS_PASS * The password for the Redis server
REDIS_PORT * The port for the Redis server
DBL_KEY * A discordbots.org API Token, used to get information about other bots 🕵
PATREON_KEY * Used to tell who is a patreon and who isn't.
LASTFM_KEY * Used to find related songs for autoplay.
SPOTIFY_CLIENT_ID * Used to hack spotify support into music.
SPOTIFY_CLIENT_SECRET * see above
DEBUG * A lot of packages come with debugging enabled via the "debug" variable. Set DEBUG=* to get debug messages from all the things.

* Optional, but some features may not work without them.

Development "Features"

The NODE_ENV environment variable must be set to development for these to work.

  • To run a filter without it being enabled, include Atlas:forceFilter:filter with whatever you want to test. E.g, Atlas:forceFilter:invites discord.gg/AXXBPM7 will the "invites" filter to execute even when it's action type is 0.

Disclaimer / Warning

If you're going to self-host Atlas, you won't get help with setting it up. We may refuse to support you with general issues. You are responsible if you break anything. Seriously, if you don't know what you're doing, just use the public instance.

Acknowledgements