Discord integration for Django, supporting error reporting via webhooks.
Project description
Django Discord Integration
Discord integration for Django, supporting error reporting via webhooks.
This app comes with two message handlers: DiscordMessageHandler
and SimpleDiscordMessageHandler
. DiscordMessageHandler
sends all the information related to the message, such as a traceback if there is one, while the SimpleDiscordMessageHandler
only sends the title.
Installation
$ pip install django-discord-integration
In your settings.py
, add the following:
INSTALLED_APPS = (
'discord_integration',
...
)
Next, migrate the database:
$ python manage.py migrate
Finally, create a Discord integration object in the Django admin site. Set the Discord webhook URL as well as the bot username and avatar URL if necessary. You can create multiple objects to direct different logs to different channels. The default object should the name default
.
Sample Logging Configuration
LOGGING = {
'handlers': {
'discord_integration': {
'level': 'ERROR',
'class': 'discord_integration.log.DiscordMessageHandler',
'model_name': 'default', # OPTIONAL: specify a name to use a different integration configuration.
},
},
'loggers': {
'handlers': ['discord_integration'],
},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-discord-integration-1.2.8.tar.gz
.
File metadata
- Download URL: django-discord-integration-1.2.8.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf37e0e204bff4bf6c855831f1a61fb90151f02933a937b04f729f251bca8d2 |
|
MD5 | 7c27a5f719eeb0fa7956f4b4110bdb96 |
|
BLAKE2b-256 | 33a20caa107965d6e53dcdd486baf1713d626815f7525efbd7a25df039adcb26 |
File details
Details for the file django_discord_integration-1.2.8-py3-none-any.whl
.
File metadata
- Download URL: django_discord_integration-1.2.8-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5736dbf60499c6cc3ee5c98dcd306cb9de39282e747a27fa7c83eb3f4d8ce274 |
|
MD5 | 5112087fe61fcdc2ffb7a7bb9d378f35 |
|
BLAKE2b-256 | 1d622a293d2b43be23e70c348d0c84b43203fc5b34dcf107c6e55cdbdd81ebd6 |