A fully-featured Python SDK for building Nerimity bots
Project description
nerimity-sdk
A fully-featured Python SDK for building bots on Nerimity.
pip install nerimity-sdk
pip install nerimity-sdk-contrib # optional: ready-made plugins
Quickstart
nerimity create my-bot
cd my-bot && cp .env.example .env # paste your token
python bot.py
Or manually:
import os
from dotenv import load_dotenv
from nerimity_sdk import Bot
load_dotenv()
bot = Bot(token=os.environ["NERIMITY_TOKEN"])
@bot.on("ready")
async def on_ready(me):
print(f"Logged in as {me.username}#{me.tag}")
@bot.command("ping", description="Replies with Pong!")
async def ping(ctx):
await ctx.reply("Pong! 🏓")
bot.run() # auto-restarts on crash and on file save
Features
| Feature | How to use |
|---|---|
| Slash + prefix commands | @bot.command("ping") — works as /ping (default) |
| Type annotation converters | async def add(ctx, a: int, b: int) — no args= needed |
| Permission shortcut | @bot.command("ban", requires=Permissions.BAN_MEMBERS) |
| Command groups | mod = bot.group("mod") → /mod ban, /mod kick |
| Disable/enable commands | bot.disable_command("ping", server_id) |
| Buttons | @bot.button("confirm_{action}") |
| Confirmation prompts | await ctx.confirm("Sure?") |
| Multi-step conversations | await ctx.ask("Your name?") |
| Wait for events | await bot.wait_for("reaction_added", count=3, timeout=60) |
| Embeds with fields | Embed().title("Hi").field("Name", "Value") |
| File uploads | await ctx.reply_file("image.png") |
| DM reply | await ctx.reply_dm("hi") |
| Auto-delete reply | await ctx.reply_then_delete("done", delay=5) |
| Silent reply | await ctx.reply_silent("shh") |
| Paginator | await Paginator(pages).send(ctx) |
| Auto-paginate long text | await ctx.reply_paginated(long_text) |
| Pin/delete messages | await ctx.pin() / await ctx.delete() |
| Forward message | await ctx.forward(channel_id) |
| Persistent storage | JsonStore / SqliteStore / RedisStore |
| Scheduled tasks | @bot.cron("0 9 * * *") |
| Plugins (hot-reload) | await bot.plugins.load(MyPlugin()) |
| Per-guild prefix | await bot.prefix_resolver.set(server_id, "?") |
| Cooldown scopes | cooldown=5.0, cooldown_scope="server" |
| Rate limit hook | @bot.on_ratelimit async def handler(route, retry_after) |
| Health endpoint | Bot(health_port=8080) → GET /health, GET /stats |
| JSON structured logs | Bot(json_logs=True) |
| Runtime stats | bot.stats — uptime, messages, commands, cache sizes |
| Built-in /stats command | every bot gets /stats automatically |
| Auto-restart on crash | enabled by default in bot.run() |
| Auto-restart on file save | enabled by default in bot.run() |
| REST: bulk role assign | await bot.rest.add_roles(server_id, user_id, [r1, r2]) |
| REST: create/delete channel | await bot.rest.create_channel(server_id, name) |
| REST: fetch bans | await bot.rest.fetch_bans(server_id) |
| REST: set nickname | await bot.rest.set_nickname(server_id, user_id, name) |
| Webhooks | await Webhook(token).send("Hello!") |
| OAuth2 | OAuth2Client |
Contrib plugins
pip install nerimity-sdk-contrib
| Plugin | Description |
|---|---|
WelcomePlugin |
Greets new members |
AutoModPlugin |
Deletes messages matching word/regex list |
MessageFilterPlugin |
Block links, invites, or custom patterns |
MessageSnapshotPlugin |
Logs deleted/edited messages |
ModerationLogPlugin |
Logs mod actions to a channel |
WarnPlugin |
/warn, /warnings, /clearwarns with auto-kick |
StarboardPlugin |
Reposts highly-reacted messages |
LoggingPlugin |
Logs joins, leaves, deletes, edits |
RoleMenuPlugin |
React to get a role |
ReactionRolesPlugin |
Persistent reaction roles (survives restarts) |
AutoRolePlugin |
Auto-assign role on member join |
PollPlugin |
Timed reaction poll |
GiveawayPlugin |
React-to-enter giveaway |
LevelingPlugin |
XP per message, /level, /leaderboard |
BirthdayPlugin |
/birthday MM-DD, daily announcements |
ReminderPlugin |
/remind 10m take a break |
AFKPlugin |
/afk <reason>, notifies on mention |
SuggestionPlugin |
/suggest <idea> with reactions |
AntiSpamPlugin |
Rate-limit messages, auto-kick/ban |
SlowmodePlugin |
Bot-enforced per-channel slowmode |
TranslatePlugin |
Auto-translate messages |
TicketPlugin |
DM-based support tickets |
CounterPlugin |
Live member count in channel name |
CLI
nerimity create my-bot # scaffold a new project
nerimity dev bot.py # dev mode: pretty logs + live dashboard
nerimity lint # check for common mistakes
nerimity version # show SDK version
Full docs
https://nerimitysdk.readthedocs.io
Built by @Lyney:SHOW on Nerimity · JoddabodScripts on GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nerimity_sdk-1.0.8.tar.gz
(80.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nerimity_sdk-1.0.8.tar.gz.
File metadata
- Download URL: nerimity_sdk-1.0.8.tar.gz
- Upload date:
- Size: 80.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08e2365ed15272a060e4211ab7da89b7ed8e86fa07eb39a3cef243c09948d944
|
|
| MD5 |
ab92343699981cc7b51a757699ec425f
|
|
| BLAKE2b-256 |
b9b0510460cb659a14b84e22262796915e47c35ca731faa5ff78cf498f1d2f91
|
File details
Details for the file nerimity_sdk-1.0.8-py3-none-any.whl.
File metadata
- Download URL: nerimity_sdk-1.0.8-py3-none-any.whl
- Upload date:
- Size: 62.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae8df5b7cd0cf503f1ce38a9958fc1eac677643acd00931085c3d840a7d7bd19
|
|
| MD5 |
b36b991a9144e6ea873f13d273e44195
|
|
| BLAKE2b-256 |
9e80cf4dc1e8b044c490efb8bda16d7f5286da983eb9663f95412d0d25ff24bb
|