GithubHelp home page GithubHelp logo

realmayus / chime Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 44.01 MB

A scalable, intuitive and easy-to-use music bot for Discord.

Home Page: https://chime.realmayus.xyz

License: MIT License

Python 99.42% Shell 0.58%
discord-py lavaplayer hacktoberfest

chime's Introduction

Chime Banner

A scalable, intuitive and easy-to-use music bot with custom playlists for Discord.

Codacy Badge

Get Started

Don't want to host it on your own? You can invite a hosted version of chime by clicking here

Chime's website: https://chime.realmayus.xyz

Related Projects:

chime-web, the frontend of the chime website: https://github.com/realmayus/chime-web

chime-backend, the backend of the chime website: https://github.com/realmayus/chime-backend

Host chime on your own

If you however want it to host chime on your own, choose one of the two methods to install chime:

1) Automatic script
source <(curl -s https://gist.githubusercontent.com/realmayus/b313066aba5e7acd34711b03b6fd762e/raw/setup-chime-vm.sh)

This will install chime automatically in the folder chime in your home folder. The script will automatically download OpenJDK 13 and install it, install required python packages, setup a virtual environment, clone the repository, create required files and install chime. You just have to enter your firebase SDK key in secret/firebase_creds.json and your tokens in secret/token.ini. The script was tested on Ubuntu 20.04 LTS. Please make sure that you have Python >= 3.7 installed, otherwise, our music backend Lavalink might not work.

To start chime, simply start Lavalink using java -jar lavalink/Lavalink.jar (I recommend you to do this in a screen) and then start chime by simply executing chime. To uninstall it, use python3 -m pip uninstall chime-discord. Make sure that you're in the virtual environment (source venv/bin/activate).

2) Manually
  1. Install JDK 13. It has to be JDK 13
  2. Make sure that you have installed PIP and Python >= 3.7
  3. Clone the chime repository.
  4. Setup a virtual environment using python3 -m virtualenv venv and enter it using source venv/bin/activate
  5. Create a folder called secret in the chime repository that you've cloned and create two files, called firebase_creds.json and token.ini. Insert your firebase SDK key in the first one and your tokens in the second one.
  6. Install the discord.py library using python3 -m pip install discord
  7. Install chime using python3 -m pip install .
  8. Done! To uninstall chime, use python3 -m pip uninstall chime-discord, make sure you're in the current virtual environment.
token.ini

The token.ini file should contain at least one token:

  • a discord bot token

It is recommended to add one additional token:

  • a secondary discord bot token, so that you can minimize downtime while you're developing something

The file should look like this:

[token]
token = YOUR_PRIMARY_TOKEN
; token-dev = YOUR_SECONDARY_TOKEN  <-- OPTIONAL

You have to update the chime binary after changing anything:

Updating the chime binary

Every time you have changed any file, you have to update the chime binary so that your OS always loads the most recent version when you run chime. To do that, enter your virtual environment using source venv/bin/activate and run: python3 -m pip install .

Updating chime itself

If new commits were commited and you want to update chime, simply execute git pull in the root directory of chime and then update the chime binary.

Service file

If you want to use a process manager to start/stop chime automatically, you can use systemd with this config file: https://gist.github.com/realmayus/cc18a29aadff5b92c776632f8632645f Put that in /etc/systemd/system/chime.service and start the service with service chime start and stop it with service chime stop. You can see the logs using journalctl -u chime.service.

Asset Credits

Music Disc with Note: Icon made by Freepik from www.flaticon.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.