Giter Site home page Giter Site logo

moosic-bot's Introduction

Moosic Bot

A simple discord music bot written in Python

Moosic is a bot that born from the passing of groovy. It was a fun challenge to embrace. The bot has been used in some private servers for a while, and although some bugs are still existent, it works!

These are its main features:

  • Play a song or a playlist from YouTube or Spotify.
  • Basic controls of skipping, pausing, resuming, shuffling, disconnecting, and seeking.
  • Basic information about reproduction queue with now playing, and queue.
  • Supports three languages: Portuguese, English and Spanish.

This project uses discord.py, spotipy, and youtube-search-python.

Requires

How to install

Step 1: Import DB Schema

NOTE: ALL DATABASE RELATED STEPS OR SUBSTEPS CAN BE SKIPPED IF YOU WISH NOT TO USE THE DATABASE. SEE STEP 3.

To import the SQL schema:

[postgres] createdb moosic

This will create the database moosic. Then, to import the schema of this project:

$ psql -U postgres -d moosic "database.sql"

Step 2: Enviroment variables

You first need to set these enviroment variables in order for this bot to work properly:

  • MOO_BOT_KEY : A discord bot application key.
  • DATABASE_URL: An url to the PostgreSQL database. It follows a structure similar to "postgresql://user:password@host:port/database"
  • SP_CLIENT : Client application key from Spotify.
  • SP_SECRET : Secret application key from Spotify.

Once these are set, it's time to fetch the project's dependencies.

python3 -m pip install -r requirements.txt

And it should be enough.

Step 3: Executing

Executing is the easiest step.

python moosic.py

In case you had trouble setting up the database, you might want to execute, instead:

python moosic.py --no-database

However, the language of the bot will only be available in portuguese. Also, MOO_BOT_KEY, SP_CLIENT and SP_SECRET must be existing environment variables. See Step 2.

License

moosic-bot is licensed under the MIT License.

moosic-bot's People

Contributors

murilobnt avatar

Stargazers

Alison Bento avatar

Watchers

James Cloos avatar  avatar

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.