Skip to main content

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

Project description

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

# No SSL/HTTPS
{"host": "losingtime.dpaste.org", "port": 2124, "password": "SleepingOnTrains"}
{"host": "lava.link", "port": 80, "password": "dismusic"}
{"host": "lavalink.islantay.tk", "port": 8880, "password": "waifufufufu"}

# SSL
{"host": "lavalink.devz.cloud", "port": 443, "password": "mathiscool", "https": True},
{"host": "lavalink2.devz.cloud", "port": 443, "password": "mathiscool", "https": True},
{"host": "disbotlistlavalink.ml", "port": 443, "password": "LAVA", "https": True},
{"host": "lavalink.scpcl.site", "port": 443, "password": "lvserver", "https": True},
{"host": "lavalink.mariliun.ml", "port": 443, "password": "lavaliun", "https": True},
{"host": "lavalinkinc.ml", "port": 443, "password": "incognito", "https": True},
{"host": "node1.lavalink.trgop.gq", "port": 443, "password": "onionispro", "https": True},
{"host": "node3.lavalink.trgop.gq", "port": 443, "password": "onionop", "https": True},
{"host": "node5.lavalink.trgop.gq", "port": 443, "password": "htandsm", "https": True},
{"host": "www.lavalinknodepublic.ml", "port": 443, "password": "mrextinctcodes", "https": True},
{"host": "www.lavalinknodepublic2.ml", "port": 443, "password": "mrextinctcodes", "https": True},
{"host": "lavalink.cobaltonline.net", "port": 443, "password":"cobaltlavanode23@", "https": True},

Join Discord For any kind of help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dismusic-1.2.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

dismusic-1.2.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file dismusic-1.2.1.tar.gz.

File metadata

  • Download URL: dismusic-1.2.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for dismusic-1.2.1.tar.gz
Algorithm Hash digest
SHA256 01e79294eeb33a112cd843b6aff5c0a48b4f6956874ee82615995cc3b6e27ac1
MD5 d53511c2a02b51683d1c6ba039eb70bc
BLAKE2b-256 898f65a5fbf3b218d66afe2e07e69db3dea511122c15c5cd0c2c7a97b659b199

See more details on using hashes here.

File details

Details for the file dismusic-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: dismusic-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for dismusic-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e745efc10db7c2e7fceff77b5c8ee2dce72cbe7fca6c73d9671b4e567bbc50ff
MD5 695e0680d732b3a084d65159b7cf3621
BLAKE2b-256 69777208fef3ec2f5d3085dde3411704780b561ea30817c37535bad2e2a335f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page