Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahriyardx/dismusic
Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.
https://github.com/shahriyardx/dismusic
discord discord-music-bot lavalink wavelink
Last synced: 2 months ago
JSON representation
Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.
- Host: GitHub
- URL: https://github.com/shahriyardx/dismusic
- Owner: shahriyardx
- License: mit
- Created: 2022-02-08T10:52:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-26T21:22:28.000Z (over 2 years ago)
- Last Synced: 2024-09-20T15:27:52.132Z (4 months ago)
- Topics: discord, discord-music-bot, lavalink, wavelink
- Language: Python
- Homepage: https://pypi.org/project/dismusic/
- Size: 47.9 KB
- Stars: 62
- Watchers: 3
- Forks: 35
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Downloads](https://static.pepy.tech/personalized-badge/dismusic?period=total&units=abbreviation&left_color=blue&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/dismusic)
# dismusicMusic cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.
# Installation
```sh
python3 -m pip install dismusic
```or from Github (Might be unstable)
```sh
python3 -m pip install git+https://github.com/shahriyardx/dismusic.git
```# Usage
```python
from discord.ext import commandsbot = 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
```py
on_dismusic_player_connect(player):
# When player connects to a voice channelon_dismusic_player_stop(player):
# When player gets disconnectedon_dismusic_track_start(player, track):
# When a song start playingon_dismusic_track_end(player, track):
# When a song finishedon_dismusic_track_exception(player, track):
# When song stops due to any exceptionon_dismusic_track_stuck(player, track):
# When a song gets stuckon_dismusic_player_pause(player):
# When player gets pausedon_dismusic_player_resume(player):
# When player gets resumedon_dismusic_player_seek(player, previous_position, current_position):
# When player seeks
```# Lavalink Configs
Find configs here [https://lavalink.darrennathanael.com/](https://lavalink.darrennathanael.com/)[Join Discord](https://discord.gg/7SaE8v2) For any kind of help