Skip to content

blackpatton17/bilibili-bot

Repository files navigation

Discord Bilibili Bot

Python version

Discord Bilibili Bot is a MusicBot that is extended from MusicBot to make it support songs from Bilibili. It is written for Python 3.5+ using the discord.py library. It plays requested songs from Bilibili or YouTube into a Discord server (or multiple servers). Besides, if the queue becomes empty MusicBot will play through a list of existing songs with configuration. The bot features a permission system allowing owners to restrict commands to certain people. As well as playing songs, MusicBot is capable of streaming live media into a voice channel (experimental).

Main

Directly invite the hosted bot to your channel

There is a running instance of this discord Bilibili bot called Bilibili Music Bot available for you to directly use in your channel. Simply invite the bot into your server using this link. The command prefix is > and for all the commands available, please type >help in your channel.

Create your own bilibili bot

Setup

Setting up the MusicBot is relatively painless - just follow the one of the guides offered by the original MusicBot, and pay attention to the Bilibili section below. After that, configure the bot to ensure its connection to Discord.

The main configuration file is config/options.ini, but it is not included by default. Simply make a copy of example_options.ini and rename it to options.ini. See example_options.ini for more information about configurations.

Commands

There are many commands that can be used with the bot. Most notably, the play <url> command (preceded by your command prefix) will download, process, and play a song from YouTube or a similar site. A full list of commands is available here.

Bilibili related

The functionality part related to Bilibili video downloading is modified from Bilibili_video_download. It was rewritten from synchronous multi-threading downloading into asynchronous downloading using python's asyncio.

options.ini

There is a new opintion named BilibiliQuality under the MusicBot section which represents the quality of the videos to download from bilibili. The available options includes 80, 64, 32, 16, which represents 1080p, 720p, 480p, 360p correspondingly.

Contributing

Forks and Pull Requests are welcome! Please make sure you tested the code before creating the PR and please include a brief introduction of what you changed in the PR. Thank you.

Further reading

For Ubuntu

apt-get install libjpeg-dev zlib1g-dev ffmpeg

TypeError: new() got an unexpected keyword argument 'deny_new'

python3 -m pip install -U discord.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages