61 lines
1.2 KiB
Markdown
61 lines
1.2 KiB
Markdown
# Discord emoji uploader
|
|
|
|
I just wanna put my emojis on my Discord server.
|
|
|
|
## Setup
|
|
|
|
### (Optional) Set up a virtual environment
|
|
|
|
```
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
```
|
|
|
|
### Install the required packages
|
|
|
|
```
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### Edit the config
|
|
|
|
Rename `sample-config.json` to `config.json`.
|
|
|
|
```
|
|
mv sample-config.json config.json
|
|
```
|
|
|
|
Then, edit in your API Key and Guild ID.
|
|
|
|
### (Optional) Add emoji files
|
|
|
|
Any images in the `emojis/` directory will be uploaded by default.
|
|
Each image will use the name of the file for the text code, for exmaple:
|
|
|
|
Uploading `somecoolemoji.png` will result in an emoji that can be used
|
|
with `:somecoolemoji:`.
|
|
|
|
## Usage
|
|
|
|
Assuming your `config.json` is in the default place at the root of the
|
|
project directory, and the emoji images you want to upload are in `emoji/`,
|
|
you do not need to add any arguments. You can, however, run
|
|
`upload-emoji.py -h` for a usage printout.
|
|
|
|
You can specify a config file with `-c`.
|
|
|
|
```
|
|
upload-emoji.py -c some/path/to/config.json
|
|
```
|
|
|
|
You can also specify a directory for emojis.
|
|
|
|
```
|
|
upload-emoji.py -e some/path/to/emoji/images/
|
|
```
|
|
|
|
If you want more verbose logs, you can use the `-v` flag.
|
|
|
|
```
|
|
upload-emoji.py -v
|
|
```
|