FaceBot is a Discord bot that uses the Microsoft Azure Face API to analyze faces as a Discord bot.
- Node.JS
- Microsoft SQL Server on Linux or Windows (Tested with SQL 2019 on Linux and SQL 2019 on Windows)
I designed FaceBot to be run in Docker so it can be deployed easier, and it's also how I run FaceBot in production.
Use this command to start FaceBot:
docker run -d -e BOT_TOKEN=(bot token) -e FACE_KEY=(Azure Face API Key) ghcr.io/icomputer7/facebot
Clone this repo and cd into it. Run docker build -t facebot .
Let it do its thing. Then use docker run -d -e BOT_TOKEN=(bot token) -e FACE_KEY=(Azure Face API Key) facebot
to start FaceBot.
BOT_TOKEN
- This is the Discord bot token.ADMIN_ID
- This is the Discord ID of the bot admin.LOG_CHANNEL
- A Discord text channel ID that the bot can send logs to.SQL_HOST
- FQDN/IP address of the SQL host.SQL_USER
- SQL usernameSQL_PASS
- SQL passwordSQL_DB
- SQL databaseFACE_KEY
- Face API keyCOMP_VISION_KEY
- Computer Vision API keyBOT_PREFIX
- Bot's command prefixTEST_MODE
- Set totrue
to enable test mode, which makes logging more verbose.
Upload an image with the caption ;face
or just say ;face (image url)
I didn't save the actual SQL I used to make this table but here's a basic schema that you need to copy:
id
- auto-incrementing integerevent_type
- VARCHAR(500)event_details
- VARCHAR(MAX)timestamp
- Unix timestamp, stored as bigint