examplebot

command
v0.0.0-...-7bbd703 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

examplebot 示例机器人(#51 验收脚本):用 litetalkctl 签发的 bot 令牌连 WS 网关(同一条 client.hello 路径,token 即 api_token),加入频道后监听 chat.message,命中关键字自动回一条。协议类型直接用服务端 internal/signal 的生成物——不 import client 模块。

用法:

litetalkctl bot create --name 值班机器人   # 拿到一次性 ltk_bot_* 明文
LITETALK_BOT_TOKEN=ltk_bot_... LITETALK_CHANNEL=<频道ID> \
  go run ./cmd/examplebot -addr 127.0.0.1:8077

在该频道发一条含关键字(默认 "bot")的消息,机器人即回帖并打日志。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL