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',
    'solo',
    ...
)

Next, migrate the database:

$ python manage.py migrate

Finally, set the Discord webhook URL in the Django admin, as well as the bot username and avatar URL if necessary.

Sample Logging Configuration

LOGGING = {
    'handlers': {
        'discord_integration': {
            'level': 'ERROR',
            'class': 'discord_integration.log.DiscordMessageHandler',
        },
    },
    '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.

Files for django-discord-integration, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size django_discord_integration-1.0.5-py3-none-any.whl (18.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-discord-integration-1.0.5.tar.gz (16.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page