telegram

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

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 (*BotApp) Bot

func (app *BotApp) Bot() *telego.Bot

func (*BotApp) PostAndCreateArtwork

func (b *BotApp) PostAndCreateArtwork(ctx context.Context, artwork *entity.CachedArtworkData) error

func (*BotApp) Run

func (app *BotApp) Run(ctx context.Context, serv *service.Service)

func (*BotApp) SendArtworkInfo

func (b *BotApp) SendArtworkInfo(ctx context.Context, sourceUrl string, chatID int64, appendCaption string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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