Skip to content

devmitch/heic2jpg-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heic2jpg-bot

A simple Discord bot that looks for attachments with .heic or .heif extensions, converts them with heif-convert to a JPEG, and then uploads back onto discord. Deployed on Heroku.

I made this because my students on Discord often upload photos from Apple devices which are HEIF files, and Discord cannot preview these files, so I would either have to use an external program to view them or convert them manually to a JPEG.

Setup & Running:

The bot will look for the Discord token under the environment variable DISCORD_TOKEN. On linux:

$ export DISCORD_TOKEN=yourtokenhere
$ python3 -m pip install -r requirements.txt
$ sudo apt install libheif-examples
$ python3 bot.py

Notes

Procfile, Aptfile and runtime.txt are Heroku specific files, you do not need them to run/deploy the bot if you are not using Heroku.

About

Discord bot that automatically converts HEIC images to JPG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages