Skip to main content

dotbot-neverland

A hack.chat bot framework which is simple, powerful, robust.

PyPI: dotbot-neverland

Installation with pip: pip install dotbot-neverland

Why?

  • Well typed

    All kinds of message are typed and you have IntelliSense. No need to deal with messy and unpredictable json objects.

  • We do the messy part

    You only need to deal with bot logic, with these things available for free:

    • Parse whisper and emote message from server message like XXX whispered: ...
    • List of online users
    • Current nickname of your bot
    • Query full user info with nickname
    • ...
  • For the future

    Dotbot-neverland is designed for asyncio.

    Also, it is written in the latest syntax of Python 3.12. Therefore, it only supports python >= 3.12.

Why Not? There are also some limitations. If you need one of the followings, we suggest you choose hvicorn:

  • Synchronous or threaded API
  • Compatible with older versions of Python

Quickstart

import asyncio
import os

from dotbot_neverland import Bot, ChatEvent, Context, SelfJoinEvent, WhisperEvent

bot = Bot()


@bot.on("onlineSet")
async def hello(c: Context[SelfJoinEvent]):
    await c.bot.chat("Hello from dotbot-neverland!")


@bot.on("chat", "whisper")
async def ping(c: Context[ChatEvent | WhisperEvent]):
    if c.event.text == "ping":
        await c.reply("pong!")


asyncio.run(bot.connect("lounge", "ping", os.getenv("HC_PWD")))

Documentation

/docs

TODO

  • Bypass DNS poisoning
  • Graceful ignore self
  • Informative error message
    • Error during parcing
  • Update-able chat message
  • Graceful shutdown
  • Command-like system
  • Reusable collection of listeners
  • Profiling and optimization
  • Hook system and logging
  • anti rate-limit and warnings
    • modelling of common warnings
    • built-in auto reconnecting
    • ability to know whether a message is accepted by HC (difficult)
    • optional auto-retry mechanism
  • Documentation
    • Articles
    • Generated API reference
    • Docstrings

Credits

  • foolishbird by light/await

    This inspired me to start both making HC bots and learning Python.

  • hvicorn by 0x24a

    This bot framework realized my dream of a "well typed" bot framework. It is very creative compared to previous bot frameworks, and dotbot-neverland references it heavily. Actually, the whole design of dotbot-neverland is inspired by hvicorn.

Metadata

Release files for dotbot-neverland 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dotbot-neverland 0.1.3
File Size Uploaded Provenance Actions
dotbot_neverland-0.1.3.tar.gz 10.3 kB Without provenance Details for dotbot_neverland-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dotbot-neverland 0.1.3
File Interpreter ABI Platform Actions
dotbot_neverland-0.1.3-py3-none-any.whl Python 3 none any Details for dotbot_neverland-0.1.3-py3-none-any.whl

Total release size: 21.4 kB

Release files / dotbot_neverland-0.1.3.tar.gz

Download URL dotbot_neverland-0.1.3.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2c580ccac12237f13fae17af16ff26010b44fe9dbb24ab0bda427cec5b2ff386
BLAKE2b-256 checksum
How to use checksums
faf6add130c39815b00a6f09d8256c1f465fdaf2436405546bbb7d2360fe9bc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / dotbot_neverland-0.1.3-py3-none-any.whl

Download URL dotbot_neverland-0.1.3-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d31744f9bba49905a69a39e6143dc2e1fb718d7f6c56828d8777e1b8b6b46f72
BLAKE2b-256 checksum
How to use checksums
68a9d59bf9d9fdef42d8302655ab9759538eaeb53718ee6b0145e6a9100eb94c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for dotbot-neverland 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page