Registry / communication / allianceauth-discordbot

allianceauth-discordbot

JSON →
library5.0.0pypypiunverified

allianceauth-discordbot is a modular Discord bot designed to integrate deeply with Alliance Auth, a Django-based authentication system for EVE Online alliances. It provides features like user lookup, permissions management, and custom commands, leveraging Django's ORM and authentication. The current version is 5.0.0, and it maintains an active release cadence, often pushing minor updates and bug fixes.

pip install allianceauth-discordbot
INSTALL
IMPORT
SIG · ALLIANCEAUTH-DISCO
A
allianceauth-discordbot
communicationpythonv5.0.0
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

commands
from discord.ext import commands
Standard discord.py commands module for creating cogs and commands.
has_perm
from aadiscordbot.cogs.utils.decorators import has_perm
Decorator for checking Alliance Auth permissions on bot commands.
AABot
from aadiscordbot.bot import AABot
from aadiscordbot.bot import DiscordBot
The main bot class was renamed from DiscordBot to AABot in earlier versions to avoid conflicts and improve clarity.

To quickly get started with allianceauth-discordbot, you need a running Alliance Auth (Django) project. This example shows how to define a simple custom cog within one of your Django applications. This cog provides two basic commands: `!myhello` (requires Alliance Auth 'basic_access' permission) and `!myping`. The bot is then run using `python manage.py runbot` after configuring `AABOT_TOKEN` and `AABOT_COG_PATH` in your Django `settings.py`.

import discord from discord.ext import commands from aadiscordbot.cogs.utils.decorators import has_perm # This cog should be placed within a Django app included in INSTALLED_APPS # and its path added to AABOT_COG_PATH in your Django settings. class MyCustomCog(commands.Cog): def __init__(self, bot): self.bot = bot @commands.hybrid_command(name="myhello") @has_perm("aadiscordbot.basic_access") # Requires 'Basic Access' permission in Alliance Auth async def my_hello_command(self, ctx: commands.Context): """Greets the user from Alliance Auth bot.""" await ctx.send(f"Hello from your custom cog, {ctx.author.display_name}!", ephemeral=True) @commands.hybrid_command(name="myping") async def my_ping_command(self, ctx: commands.Context): """Responds with the bot's latency.""" await ctx.send(f"Pong! {round(self.bot.latency * 1000)}ms", ephemeral=True) async def setup(bot): # This 'setup' function is called by the bot to load the cog. await bot.add_cog(MyCustomCog(bot)) # To run the bot, ensure it's configured in your Django settings (settings.py): # INSTALLED_APPS = [ # ..., # 'aadiscordbot', # 'my_django_app' # Where your custom cogs reside # ] # # AABOT_TOKEN = os.environ.get('AABOT_TOKEN', 'YOUR_DISCORD_BOT_TOKEN') # AABOT_PREFIX = '!' # AABOT_COG_PATH = ['my_django_app.cogs'] # List of paths to your cog modules # # Then, from your Django project root: # python manage.py runbot
Debug
Known issues
breakingThe internal ESI provider has been removed in version 5.0.0. If you had custom cogs or extensions that relied on `aadiscordbot.providers.esi` for EVE Online ESI data, they will no longer function.
fix
Migrate your custom cogs to use an external ESI client library (e.g., PyESI) or implement your own OpenAPI client for ESI calls. The library now encourages users to roll their own client.
affects: >=5.0.0
breakingVersion 4.0.0 introduced significant changes to custom task functionality and helper modules for external services. While not all changes are directly breaking, custom implementations relying on older patterns for tasks or inter-module communication might need updates.
fix
Review the official documentation and GitHub README for 4.0.0+ regarding 'Running Custom Bot Context Tasks' and 'Using AA-Discordbot from my Project' to adapt your code to the new helper functions and task mechanisms.
affects: >=4.0.0
gotchaallianceauth-discordbot requires Python 3.8 or higher. Attempting to install or run the bot with older Python versions will result in dependency resolution failures or runtime errors.
fix
Ensure your environment uses Python 3.8 or a newer compatible version (e.g., Python 3.9, 3.10, 3.11).
affects: <=3.8.0
gotchaWhen developing custom cogs, ensure that `aadiscordbot` and your custom cog's Django app are correctly listed in `INSTALLED_APPS` and `AABOT_COG_PATH` in your Django `settings.py`. Forgetting this is a common cause of cogs not loading.
fix
Double-check your `settings.py`: `INSTALLED_APPS = ['aadiscordbot', 'your_app']` and `AABOT_COG_PATH = ['your_app.cogs']` (where 'your_app.cogs' is the Python import path to your cogs module/directory).
affects: All versions
Upgrade
Version history
5.0.0latest on PyPI · released Mar 8, 2026
Audit
Dependencies
DjangorequiredIt is a Django application and requires a running Django project.
discord.pyrequiredIt is a Discord bot built on discord.py.
AllianceAuthrequiredIt is an extension for Alliance Auth.
Agent activity
66 hits · last 30 days
node
56
Perplexity
1
OpenAI (training)
1
Resources
allianceauth-discordbot — pip install allianceauth-discordbot · libregistry