help

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

help 包提供一个可配置的基础帮助命令插件。

Index

Constants

This section is empty.

Variables

View Source
var Plugin = absdk.Define(absdk.Spec[Config]{
	Manifest: absdk.Manifest{Name: "help", Version: "1.0.2", Description: "基础帮助命令"},
	DefaultConfig: Config{
		Command: "help",
		Lines:   []string{"可用命令:", "/help 显示帮助"},
	},
	Setup: func(ctx *absdk.Context, cfg Config) error {
		ctx.Command(cfg.Command).Name("command").Handle(func(c *absdk.EventContext) error {
			_, err := c.ReplyText(strings.Join(cfg.Lines, "\n"))
			return err
		})
		return nil
	},
})

Functions

This section is empty.

Types

type Config

type Config struct {
	Command string   `yaml:"command"`
	Lines   []string `yaml:"lines"`
}

Jump to

Keyboard shortcuts

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