bot

package
v0.0.0-...-53bda00 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var START_TEXT string = "初次见面,请多指教,我是图文并茂的gakki_say~ \n" +
	"你可以使用我生成带文字的Gakki图片 \n" +
	"我会根据emoji选择相应的Gakki图片并合成文字返回\n\n" +
	"有2种使用方法:\n" +
	"  1、私聊模式:私聊`发送 `emoji 你的文字`(注意emoji后有空格哦)\n" +
	"  2、内联模式:任意聊天框里发送 `@gakki_say_bot emoji 你的文字`选择图片 \n" +
	"\n" +
	"现在,输入 '👍 元气' 试试看~ \n\n" +
	"或者点击 '举个栗子' 快速体验\n" +
	"贡献代码或素材请点击 '项目地址'\n"

Functions

func CallbackQueryHandler

func CallbackQueryHandler(bot *tgbotapi.BotAPI, chatId int64, messageId int, replyMessageId int, callbackQueryId string, callbackQueryData string, imgDir embed.FS, fontDir embed.FS)

func CommmandHandler

func CommmandHandler(bot *tgbotapi.BotAPI, chatId int64, command string, imgDir embed.FS, fontDir embed.FS)

func DiceHandler

func DiceHandler(bot *tgbotapi.BotAPI, chatId int64, messageId int, dice *tgbotapi.Dice)

func FetchTask

func FetchTask(botToken string, proxy string, updateCallback func(TgUpdType, *tgbotapi.BotAPI, tgbotapi.Update))

func InlineQueryHandler

func InlineQueryHandler(bot *tgbotapi.BotAPI, inlineQueryId string, query string, fromId int64, symbolMaps *policy.SymbolMaps, host string, imgDir embed.FS)

func UserTextHandler

func UserTextHandler(bot *tgbotapi.BotAPI, chatId int64, chatType string, messageId int, replyMessageId int, userText string, symbolMaps *policy.SymbolMaps, imgDir embed.FS, fontDir embed.FS)

Types

type TgUpdType

type TgUpdType int
const (
	Message TgUpdType = iota
	CallbackQuery
	Dice
	InlineQuery
)

Jump to

Keyboard shortcuts

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