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!
Invite me! (Still under development, but now available to invite!)
What's next?
Something wrong?
- Install Node.js ^14.3.0.
- Install yarn.
- Run
yarn install
in a terminal in the project root directory. - Generate a bot application on Discord Developer Portal.
- Create a file called
.env
in thesrc
folder and fill it with the secret keys specified below. - Start your server by running
yarn run start
ornpm start
. - 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
. - That's it! Need help? Create an issue here and tag it as "need help".
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 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"
}
Just do whatever you want and create a pull request.
This project is licensed under the MIT License - see the LICENSE.md for details.