Documentation
¶
Index ¶
- Variables
- type BotApp
- func (app *BotApp) Bot() *telego.Bot
- func (b *BotApp) PostAndCreateArtwork(ctx context.Context, artwork *entity.CachedArtworkData) error
- func (app *BotApp) Run(ctx context.Context, serv *service.Service)
- func (b *BotApp) SendArtworkInfo(ctx context.Context, sourceUrl string, chatID int64, appendCaption string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CommonCommands = []telego.BotCommand{ { Command: "start", Description: "开始使用", }, { Command: "files", Description: "获取作品原图文件", }, { Command: "setu", Description: "来点涩图(R18)", }, { Command: "random", Description: "随机1张全年龄图片", }, { Command: "search", Description: "搜索相似图片", }, { Command: "info", Description: "获取作品图片和信息", }, { Command: "help", Description: "食用指南", }, { Command: "hybrid", Description: "基于语义与关键字混合搜索作品", }, { Command: "similar", Description: "获取与回复的图片相似的作品", }, } AdminCommands = []telego.BotCommand{ { Command: "addadmin", Description: "添加管理员", }, { Command: "deladmin", Description: "删除管理员", }, { Command: "delete", Description: "删除作品", }, { Command: "r18", Description: "更改作品 R18", }, { Command: "title", Description: "设置作品标题", }, { Command: "tags", Description: "设置作品标签(覆盖)", }, { Command: "autotag", Description: "自动添加作品标签", }, { Command: "addtags", Description: "添加作品标签", }, { Command: "deltags", Description: "删除作品标签", }, { Command: "tagalias", Description: "为标签添加别名", }, { Command: "post", Description: "发布作品", }, { Command: "refresh", Description: "刷新作品缓存", }, { Command: "recaption", Description: "重新生成作品描述", }, { Command: "dump", Description: "导出作品信息", }, } )
Functions ¶
This section is empty.
Types ¶
type BotApp ¶
type BotApp struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(ctx context.Context, serv *service.Service, cfg runtimecfg.TelegramConfig) (*BotApp, error)
func (*BotApp) PostAndCreateArtwork ¶
Click to show internal directories.
Click to hide internal directories.