Skip to main content

A fully-featured Python SDK for building Nerimity bots

Project description

nerimity-sdk

A Python library for building bots on Nerimity. Don't worry if you're new to Python — this guide will walk you through everything step by step! 🐱


Before you start — install Python (Windows)

If you've never used Python before, that's totally fine! Here's how to get set up:

  1. Go to python.org/downloads and download the latest version
  2. Run the installer — make sure to check "Add Python to PATH" before clicking Install
  3. Open Command Prompt (press Win + R, type cmd, hit Enter)
  4. Type python --version and press Enter — if you see a version number, you're good to go! ✅

Install the SDK

Open Command Prompt and run:

pip install nerimity-sdk
pip install nerimity-sdk-contrib

nerimity-sdk-contrib is optional — it adds ready-made plugins like welcome messages, leveling, polls, and more.


Get your bot token

  1. Go to nerimity.com/app/settings/developer/applications
  2. Create a new app → add a Bot → copy the token
  3. Keep it secret! Never share your token with anyone 🔒

Make your first bot

The easiest way is with the CLI:

nerimity create my-bot
cd my-bot
copy .env.example .env

Open .env in Notepad and paste your token:

NERIMITY_TOKEN=paste_your_token_here

Then run your bot:

python bot.py

That's it! Your bot is online 🎉


Or set it up manually

Create a new folder, open it in Command Prompt, and make a file called bot.py:

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()

Create a .env file in the same folder:

NERIMITY_TOKEN=paste_your_token_here

Then run:

python bot.py

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 commands

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


Linux install

Open a terminal and run:

pip install nerimity-sdk
pip install nerimity-sdk-contrib  # optional

Then follow the same steps above — just use cp .env.example .env instead of copy.


Built by @Kansane:TETO on Nerimity · JoddabodScripts on GitHub

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

nerimity_sdk-1.4.4.tar.gz (155.9 kB view details)

Uploaded Source

Built Distribution

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

nerimity_sdk-1.4.4-py3-none-any.whl (78.0 kB view details)

Uploaded Python 3

File details

Details for the file nerimity_sdk-1.4.4.tar.gz.

File metadata

  • Download URL: nerimity_sdk-1.4.4.tar.gz
  • Upload date:
  • Size: 155.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for nerimity_sdk-1.4.4.tar.gz
Algorithm Hash digest
SHA256 0c6d622b7f2f15eede8f13d426bc93d49c7bc2dfae798ca9ff7afa74103fba4d
MD5 6d2b95d401737950b07fb06fb012b9cf
BLAKE2b-256 e87151135839d99d23cea20869fb5fe0db92121249e067957f036da28d90c7bc

See more details on using hashes here.

File details

Details for the file nerimity_sdk-1.4.4-py3-none-any.whl.

File metadata

  • Download URL: nerimity_sdk-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 78.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for nerimity_sdk-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 902fa6428eb6a8894a7e2e6c96ac1a214aefa937be5d78aa7a6236e093630ce8
MD5 86e1e88aace15264ba1824fb90fd5ad4
BLAKE2b-256 7ca275a4f0421926dfc78c0700ab2684d188e307156e4f638cb8c2a8252024b0

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