Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.
Project description
Music Cord
Dismusic for pycord with slash commands!
Original Package By shahriyardx
Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.
Installation
Pypi
pip install music-cord
or from Github (Might be unstable)
python3 -m pip install git+https://github.com/NixonXC/cord-music.git
Usage
import discord
from discord.ext import commands
intents = discord.Intents.all()
bot = commands.Bot(command_prefix=">>", intents=intents)
TOKEN = "your token here"
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('cord-music')
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
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},
Email for support
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
Built Distribution
File details
Details for the file music-cord-2.0.5.tar.gz
.
File metadata
- Download URL: music-cord-2.0.5.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6db3e91cca9cd1ddd2b01a33a826efefecc6c8c17683832e076803d87d566183 |
|
MD5 | 75488a047ddf2e6792c776a857cceb13 |
|
BLAKE2b-256 | 5d542a75d7780dce0887cedcb8f45047dbdbf107ef15f04978542e5ad071fac3 |
File details
Details for the file music_cord-2.0.5-py3-none-any.whl
.
File metadata
- Download URL: music_cord-2.0.5-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 395e010f5df79efffc76abba1019ead4fea3ee379def2f98bdafd2a55c38bcd6 |
|
MD5 | 7b88a347638e981b64feb763ffa332aa |
|
BLAKE2b-256 | ec78d4fa6a9499362f4445264f42dff4e3f6bcc629a222e1ba5952dcbd6f9140 |