Code Monkey home page Code Monkey logo

dismusic's Introduction

Downloads

dismusic

Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.

Installation

python3 -m pip install dismusic

or from Github (Might be unstable)

python3 -m pip install git+https://github.com/shahriyardx/dismusic.git

Usage

from discord.ext import commands

bot = commands.Bot(command_prefix='..')

bot.lavalink_nodes = [
    {"host": "losingtime.dpaste.org", "port": 2124, "password": "SleepingOnTrains"},
    # Can have multiple nodes here
]

# If you want to use spotify search
bot.spotify_credentials = {
    'client_id': 'CLIENT_ID_HERE',
    'client_secret': 'CLIENT_SECRET_HERE'
}

bot.load_extension('dismusic')
bot.run('TOKEN')

Commands

connect - Connect to vc
disconnect - Disconnect from vc

play - Play a song or playlist
pause - Pause player
resume - Resume player

seek - Seek player
nowplaying - Now playing
queue - See queue
volume - Set volume
loop - Loop song/playlist

Filter commands coming soon.

Events

Events that this library dispatches

on_dismusic_player_connect(player):
    # When player connects to a voice channel

on_dismusic_player_stop(player):
    # When player gets disconnected

on_dismusic_track_start(player, track):
    # When a song start playing

on_dismusic_track_end(player, track):
    # When a song finished

on_dismusic_track_exception(player, track):
    # When song stops due to any exception

on_dismusic_track_stuck(player, track):
    # When a song gets stuck

on_dismusic_player_pause(player):
    # When player gets paused

on_dismusic_player_resume(player):
    # When player gets resumed

on_dismusic_player_seek(player, previous_position, current_position):
    # When player seeks

Lavalink Configs

Find configs here https://lavalink.darrennathanael.com/

Join Discord For any kind of help

dismusic's People

Contributors

shahriyardx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dismusic's Issues

Error

module 'wavelink' has no attribute 'WavelinkMixin

Add slash command support.

I am trying to make my music bot slash command only so if you can please integrate it, that would be great thanks.

No song/track found with given query.

Hello,
Bot worked great until a week ago. I updated it to the latest version but, i get the error in the title anytime i try to use it. It doesn't matter if i give the exact link to the bot or not.

AttributeError: module 'wavelink' has no attribute 'abc'

Traceback (most recent call last): File "C:\Users\BaraK\Desktop\FadertyBot\main.py", line 2, in <module> import dismusic File "C:\Users\BaraK\Desktop\FadertyBot\venv\Lib\site-packages\dismusic\__init__.py", line 15, in <module> from .events import MusicEvents File "C:\Users\BaraK\Desktop\FadertyBot\venv\Lib\site-packages\dismusic\events.py", line 15, in <module> class MusicEvents(commands.Cog): File "C:\Users\BaraK\Desktop\FadertyBot\venv\Lib\site-packages\dismusic\events.py", line 20, in MusicEvents self, player: DisPlayer, track: wavelink.abc.Playable ^^^^^^^^^^^^ AttributeError: module 'wavelink' has no attribute 'abc'

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.