A Discord bot for editing and creating videos, images, GIFs, and more!
general technical info about the bot
- inspired by esmBot
- uses discord.py (python discord lib)
- uses FFmpeg for most media functions
- uses selenium and ChromeDriver to render captions in html with Chrome
- although not the fastest approach, it is very readable, flexible, and easy to work with/expand.
verified working on windows 10 and ubuntu 18.04. will probably work on macos and other linux distros if the below libraries are available but theyre untested and unsupported.
the bot uses many CLI programs for media processing.
- FFmpeg - not included but easily installable on windows and linux
- If installing on ubuntu, ensure that ffmpeg version >= 4
- gifski - windows executable is included. linux version downloadable from the website
- pngquant - windows executable is included. installable on linux with
sudo apt-get install pngquant
- ChromeDriver - ChromeDriver 87.0.4280.88 for both windows and linux are included. They have functioned as intended in my testing, but here's the website anyways.
- ChromeDriver requires there to be an installation of chrome on your system accessible via path or similair. Your chrome version doesn't have to be the exact same as your chromedriver version, but it should be similar
- you may need to run
sudo chmod +x ./chromedriver87on linux to make it a working executable.
- ImageMagick - not included but downloadable here
- ExifTool - windows executable is included. installable on linux with
sudo apt-get install exiftoolhttps://exiftool.org/
- apngasm - windows executable is included. installable on linux with
sudo apt-get install apngasm
- cairo - install on linux with
sudo apt-get install libcairo2-dev. installable on windows by downloading GTK+. https://www.cairographics.org/download/
- this library is not yet used. it is needed to render lottie stickers but the library for rendering them is bugged so it isnt used yet.
- This project uses
pipenv installto install required dependencies.
- check pipenv's repo for more info on pipenv usage.
- for now, a
requirements.txtfile is also maintained, this may change.
- create a copy of
config.example.pyand name it
- insert/change the appropriate config settings such as your discord api token. be sure not to add or remove quotes.
- the 2 required config settings to change for proper functionality are the discord and tenor tokens.
- developed and tested on python 3.8. use that or a later compatible version
- once you've set up all of the libraries, just run the program with
python3.8 main.pyor whatever your python is named). make sure it can read and write to the directory it lives in and also access/execute all the aforementioned libraries
- if using pipenv, run
pipenv run python main.pyor open the venv shell with
pipenv shelland then run
- if using pipenv, run
- terminate the bot by running the
shutdowncommand, this will probably close better than a termination