NoneBot NoneBot
  • master next
  • 2.0.0a15 current
  • 2.0.0a13.post1
  • 2.0.0a10
  • 2.0.0a8.post2
  • 2.0.0a7
主页
指南
进阶
API
商店
更新日志
GitHub (opens new window)
  • master next
  • 2.0.0a15 current
  • 2.0.0a13.post1
  • 2.0.0a10
  • 2.0.0a8.post2
  • 2.0.0a7
主页
指南
进阶
API
商店
更新日志
GitHub (opens new window)
  • NoneBot Api Reference

    • nonebot 模块
    • nonebot.config 模块
    • nonebot.plugin 模块
    • nonebot.message 模块
    • nonebot.matcher 模块
    • nonebot.rule 模块
    • nonebot.permission 模块
    • nonebot.log 模块
    • nonebot.utils 模块
    • nonebot.typing 模块
    • nonebot.exception 模块
    • nonebot.drivers 模块
    • nonebot.drivers.fastapi 模块
    • nonebot.adapters 模块
    • nonebot.adapters.cqhttp 模块
    • nonebot.adapters.ding 模块

# NoneBot.utils 模块

# escape_tag(s)

  • 说明

    用于记录带颜色日志时转义 <tag> 类型特殊标签

  • 参数

    • s: str: 需要转义的字符串
  • 返回

    • str

# run_sync(func)

  • 说明

    一个用于包装 sync function 为 async function 的装饰器

  • 参数

    • func: Callable[..., Any]: 被装饰的同步函数
  • 返回

    • Callable[..., Awaitable[Any]]

# class DataclassEncoder

  • 说明

    在JSON序列化 Message (List[Dataclass]) 时使用的 JSONEncoder

在 GitHub 上编辑此页 (opens new window)
上次更新: 8/12/2021, 4:36:34 PM

← nonebot.log 模块 nonebot.typing 模块 →

Contents

  • escape_tag(s)
    • run_sync(func)
      • class DataclassEncoder