echo

package
v1.0.2 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: 1 module, 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

echo 包提供一个复读命令插件。

Index

Constants

This section is empty.

Variables

View Source
var Plugin = absdk.Define(absdk.Spec[Config]{
	Manifest:      absdk.Manifest{Name: "echo", Version: "1.0.2", Description: "复读命令"},
	DefaultConfig: Config{Command: "echo"},
	Setup: func(ctx *absdk.Context, cfg Config) error {
		ctx.Command(cfg.Command).Name("command").Handle(func(c *absdk.EventContext) error {
			text := strings.TrimSpace(c.Args())
			if text == "" {
				text = "请输入要复读的内容"
			}
			_, err := c.ReplyText(text)
			return err
		})
		return nil
	},
})

Functions

This section is empty.

Types

type Config

type Config struct {
	Command string `yaml:"command"`
}

Jump to

Keyboard shortcuts

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