Skip to main content

Forward Alliance Auth notifications to users on Discord.

Project description

Discord Notify

Forward Alliance Auth notifications to users on Discord

release python django pipeline codecov license pre-commit Code style: black chat

Contents

Overview

This app automatically forwards Alliance Auth notifications to users on Discord.

Features

  • Auth notifications appear instantly as DM on Discord
  • Notifications are colored according to their level (e.g. INFO = blue)
  • Can be restricted to notifications for superusers only (e.g. to keep track of errors)

Example

example

Installation

Step 1 - Check preconditions

  1. Discord Notify is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official AA installation guide for details)

  2. Discord Notify needs Discord Proxy to function. Please make sure the server is up and running on your system, before continuing.

  3. Please also make sure you have the Discord service installed and setup in Alliance Auth.

Step 2 - Install app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:

pip install aa-discordnotify

Step 3 - Configure Auth settings

Configure your Auth settings (local.py) as follows:

  • Add "discordnotify" to INSTALLED_APPS
  • For Docker installations: DISCORDPROXY_HOST must be set to your discord proxy container name e.g allianceauth_discordproxy.
  • Optional: Add additional settings if you want to change any defaults. See Settings for the full list.

Step 4 - Finalize App installation

Restart your supervisor services for Auth (no migration required).

Step 5 - Send test notification

To test that your installation was successful you can create a test notification to yourself by navigating to the relative route /discordnotify/test in your browser. The absolute URL depends on your Auth site. Example: For an Auth site with the URL https://auth.example.com the test URL would be:

https://auth.example.com/discordnotify/test

When everything was setup correctly, you will receive a test notification on Discord.

Congratulations you are now ready to use Discord Notify!

Settings

Here is a list of available settings for this app. They can be configured by adding them to your AA settings file (local.py).

Note that all settings are optional and the app will use the documented default settings if they are not used.

Name Description Default
DISCORDNOTIFY_ENABLED Set this to False to disable this app temporarily True
DISCORDPROXY_PORT Port used to communicate with Discord Proxy. 50051
DISCORDPROXY_HOST Hostname used to communicate with Discord Proxy. localhost
DISCORDNOTIFY_MARK_AS_VIEWED When enabled will mark all notifications as viewed that have been successfully submitted to Discord False
DISCORDNOTIFY_SUPERUSER_ONLY When enabled only superusers will be get their notifications forwarded. False

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

aa_discordnotify-4.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_discordnotify-4.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file aa_discordnotify-4.0.0.tar.gz.

File metadata

  • Download URL: aa_discordnotify-4.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for aa_discordnotify-4.0.0.tar.gz
Algorithm Hash digest
SHA256 14d6ee184d8f7d0f1ee2198fd94f5c46ad4bf0b354eb9d47016bc9e688fbb5a2
MD5 ac93f851261b4974a78cb689d800205b
BLAKE2b-256 cc44269cec7a4730311abd1cffba55d66fd078b167aeea55692c77068aea186a

See more details on using hashes here.

File details

Details for the file aa_discordnotify-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aa_discordnotify-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03fe3f831ceee5b1a950638dfa58e6d3b1aa1ecfbc9e6f97b8077bbe8ce157a6
MD5 ddaf3d9e386f164295099bcff4fde601
BLAKE2b-256 87570ab955603104b64c365d6af9781ded4d7ee8a642dc1bce4c2c43d0f8a06a

See more details on using hashes here.

Supported by

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