Skip to content

Commit

Permalink
feat:发送贴纸
Browse files Browse the repository at this point in the history
  • Loading branch information
bighu630 committed Dec 9, 2024
1 parent 9871250 commit 11db257
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion handler/quotation_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,26 @@ func (y *quotationsHandler) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error
relayToid = 0
if quotationsKey[ctx.EffectiveMessage.Text] == couple {
relayToid = ctx.Message.MessageId
_, err = b.SendSticker(ctx.Message.Chat.Id,
gotgbot.InputFileByID("CAACAgUAAxkBAANJZ1a5fJY5ltKrMN9gx_ZkPZCrRIQAAuwBAALkf3BWCEU5iNMuxVw2BA"),
&gotgbot.SendStickerOpts{
ReplyParameters: &gotgbot.ReplyParameters{
MessageId: relayToid,
ChatId: ctx.Message.Chat.Id,
},
})
m = "贴贴😳"

} else if quotationsKey[ctx.EffectiveMessage.Text] == insult {
relayToid = ctx.Message.MessageId
_, err = b.SendSticker(ctx.Message.Chat.Id,
gotgbot.InputFileByID("CAACAgUAAxkBAANSZ1a7DTn6K_7vxaeqUhTBu12QMJEAAkACAAK5ghhWDUFfjnjAp1Q2BA"),
&gotgbot.SendStickerOpts{
ReplyParameters: &gotgbot.ReplyParameters{
MessageId: relayToid,
ChatId: ctx.Message.Chat.Id,
},
})
m = "fuck you 💢,I am fuck gone"
}
}
Expand All @@ -172,7 +188,6 @@ func (y *quotationsHandler) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error
})

// 发送贴纸
// _,err = b.SendSticker(ctx.Message.Chat.Id, sticker gotgbot.InputFileOrString, opts *gotgbot.SendStickerOpts)
if err != nil {
log.Error().Err(err)
return err
Expand Down

0 comments on commit 11db257

Please sign in to comment.