picture

package
v1.2.4-beta2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

AnimeAPI/picture

Zerobot 的索取图片接口

使用

引用时,一般使用如下形式

import (
  "github.com/FloatTech/AnimeAPI/picture"
)

zero.OnKeywordGroup([]string{"欲匹配短语1", "欲匹配短语2" ...}, picture.CmdMatch, picture.MustGiven)

函数定义

func CmdMatch(ctx *zero.Ctx) bool

命令匹配

func Exists(ctx *zero.Ctx) bool

消息含有图片返回true

func MustGiven(ctx *zero.Ctx) bool

消息不存在图片阻塞60秒至有图片并将ctx.Event.MessageID设置为图片对应的消息id(plugin_acgimage依赖此特性),超时返回false

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdMatch

func CmdMatch(ctx *zero.Ctx) bool

CmdMatch 命令匹配

func Exists

func Exists(ctx *zero.Ctx) bool

Exists 消息含有图片返回 true

func MustGiven

func MustGiven(ctx *zero.Ctx) bool

MustGiven 消息不存在图片阻塞60秒至有图片,超时返回 false

Types

This section is empty.

Jump to

Keyboard shortcuts

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