diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-11 08:58:27 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 08:58:27 +0000 |
commit | d80742207bec36e20a4649a6035efdd4d0641617 (patch) | |
tree | b9efa9729abbed8d181683a75914ddfb9cff3cef /python-dismusic.spec | |
parent | 75247d685c2a5393488bbc071eee19a212a2a6ba (diff) |
automatic import of python-dismusic
Diffstat (limited to 'python-dismusic.spec')
-rw-r--r-- | python-dismusic.spec | 417 |
1 files changed, 417 insertions, 0 deletions
diff --git a/python-dismusic.spec b/python-dismusic.spec new file mode 100644 index 0000000..c72d43e --- /dev/null +++ b/python-dismusic.spec @@ -0,0 +1,417 @@ +%global _empty_manifest_terminate_build 0 +Name: python-dismusic +Version: 1.2.1 +Release: 1 +Summary: Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify. +License: MIT +URL: https://github.com/shahriyardx/dismusic/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/89/8f/65a5fbf3b218d66afe2e07e69db3dea511122c15c5cd0c2c7a97b659b199/dismusic-1.2.1.tar.gz +BuildArch: noarch + +Requires: python3-aiohttp +Requires: python3-async-timeout +Requires: python3-wavelink + +%description +# dismusic + +Music 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 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 + +```py +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 + +```py +# 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](https://discord.gg/7SaE8v2) For any kind of help + + + + +%package -n python3-dismusic +Summary: Music cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify. +Provides: python-dismusic +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-dismusic +# dismusic + +Music 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 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 + +```py +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 + +```py +# 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](https://discord.gg/7SaE8v2) For any kind of help + + + + +%package help +Summary: Development documents and examples for dismusic +Provides: python3-dismusic-doc +%description help +# dismusic + +Music 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 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 + +```py +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 + +```py +# 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](https://discord.gg/7SaE8v2) For any kind of help + + + + +%prep +%autosetup -n dismusic-1.2.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-dismusic -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.1-1 +- Package Spec generated |