Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

jonassterud/cosmos

Repository files navigation


About

Cosmos is an open source Discord bot made with Node.js. It mainly focuses on entertainment type commands, but it also supports some administration commands (ban, kick, mute, etc.). Cosmos also supports playing music from YouTube. It can handle both individual videos and playlists (and even live videos!). You can also search for videos trough Cosmos. It also includes a credit system. You can use the credits you earn over time on different minigames (blackjack, coinflip, trivia, etc.). Type ?help to get started!

Links

Invite me! (Still under development, but now available to invite!)
What's next?
Something wrong?

Local setup

  1. Install Node.js ^14.3.0.
  2. Install yarn.
  3. Run yarn install in a terminal in the project root directory.
  4. Generate a bot application on Discord Developer Portal.
  5. Create a file called .env in the src folder and fill it with the secret keys specified below.
  6. Start your server by running yarn run start or npm start.
  7. Invite your bot by inserting the bot's client id into this link: https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID_HERE&scope=bot&permissions=8.
  8. That's it! Need help? Create an issue here and tag it as "need help".

Secrets

Secrets are stored in a .env file. It holds holds secret information such as the the Discord bot token, the Pixabay API token, the API token for Giphy, the Alpha Vantage API token and the YouTube API token. The .env file should be inside the src folder, and it should look like this:

{
    TOKEN=Discord bot token here
    YOUTUBE=YouTube API token here
    GIPHY=Giphy API token here
    PIXABAY=Pixabay API token here
    ALPHAVANTAGE=Alpha Vantage API token here
}

Configuration

Configuration data is stored in the config.json file. The config.json file should be inside the src folder, and it should look like this:

{
    "prefix": "Your prefix here",
    "message_reward": "Credit reward on each message here",
    "starting_balance"": "Initial balance upon account creation here"
}

Contributing

Just do whatever you want and create a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md for details.