A discord bot that covers every angle.
Enter the Nix development shell for the latest stable Python from nixpkgs-unstable:
nix developRun Axis from the Nix development shell with the Nox task. It creates the project virtual environment, installs or upgrades all declared dependencies from PyPI, and starts the bot:
nox task startYou can install or upgrade the dependencies without starting the bot with
nox task install. Copy .env.example to the project-root .env and
set DISCORD_TOKEN before running Axis.
In environments such as Docker where a Python file is needed as the process
entry point, install uv and python3 in the image and use
python start.py. The script prefers uv on PATH and falls back to
an executable named uv in the project root. Like nox task start, it
creates or replaces the project .venv, upgrades dependencies from
requirements.txt, then starts bot.main inside that environment.
Axis requests all Discord gateway intents. In the Discord Developer Portal,
enable the privileged Server Members Intent, Presence Intent, and
Message Content Intent for the bot application as well.
The bot stays connected until the process is stopped. Run nix flake update
to refresh nixpkgs and use its latest Python release.
GitHub, Last.fm, and dictionary clients live under api/. The define
command uses the Merriam-Webster Collegiate Dictionary API and requires a
MERRIAM_WEBSTER_API_KEY in the project-root .env. The urban
command uses Urban Dictionary's public API and does not require a key.
The HTTP transport is implemented in C with libcurl and loaded through CFFI.
On first use, Axis compiles the native transport to a cached .dylib on
macOS or .so on Linux. The compiled library is cached by source version,
so subsequent runs can load it without pkg-config or the compiler being on
PATH. Run Axis inside nix develop at least once to build it. The Nix shell
provides CFFI, a C compiler, pkg-config, and libcurl. Outside Nix, the first
build requires those native development tools and Python cffi. Discord
API calls remain managed by discord.py.
Bot defaults and extension loading are configured in
bot/config/__init__.py and bot/config/bot.py. Add future extensions
to COGS.EXTENSIONS and exclude them by module name in COGS.SKIP.
Shared Discord.py and Loguru imports are available from
bot/base/imports.py. Application and Discord.py logs are configured
centrally in bot/logging/setup.py; command usage and failures are logged
with the invoking user, guild, and channel identifiers.
See TERMS.rst for the terms and conditions and PRIVACY.rst for the privacy policy. Operators of deployed instances are responsible for reviewing these documents against their hosting, configuration, and applicable legal requirements.