Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-discord-integration-1.2.8.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

django_discord_integration-1.2.8-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file django-discord-integration-1.2.8.tar.gz.

File metadata

File hashes

Hashes for django-discord-integration-1.2.8.tar.gz
Algorithm Hash digest
SHA256 ccf37e0e204bff4bf6c855831f1a61fb90151f02933a937b04f729f251bca8d2
MD5 7c27a5f719eeb0fa7956f4b4110bdb96
BLAKE2b-256 33a20caa107965d6e53dcdd486baf1713d626815f7525efbd7a25df039adcb26

See more details on using hashes here.

File details

Details for the file django_discord_integration-1.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for django_discord_integration-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5736dbf60499c6cc3ee5c98dcd306cb9de39282e747a27fa7c83eb3f4d8ce274
MD5 5112087fe61fcdc2ffb7a7bb9d378f35
BLAKE2b-256 1d622a293d2b43be23e70c348d0c84b43203fc5b34dcf107c6e55cdbdd81ebd6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page