send sticker on permisison mismatch
This commit is contained in:
parent
52f4898c2b
commit
89e3d91b0f
3 changed files with 15 additions and 7 deletions
BIN
bloater.webp
Normal file
BIN
bloater.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -13,3 +13,12 @@ func SendMessage(message tgbotapi.MessageConfig, bot *tgbotapi.BotAPI) {
|
||||||
}
|
}
|
||||||
log.Printf("[bot] Sent Message: %s", message.Text)
|
log.Printf("[bot] Sent Message: %s", message.Text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SendSticker(sticker tgbotapi.StickerConfig, bot *tgbotapi.BotAPI) {
|
||||||
|
_, err := bot.Send(sticker)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Failed to send Sticker: %v\n", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Printf("[bot] Sent Sticker")
|
||||||
|
}
|
||||||
|
|
|
@ -70,14 +70,13 @@ func SetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !commonlogic.ContainsInt64(config.BotConfig.GayPoints.ModifyUsers, update.Message.From.ID) {
|
if !commonlogic.ContainsInt64(config.BotConfig.GayPoints.ModifyUsers, update.Message.From.ID) {
|
||||||
message := tgbotapi.MessageConfig{
|
sticker := tgbotapi.StickerConfig{BaseFile: tgbotapi.BaseFile{
|
||||||
BaseChat: tgbotapi.BaseChat{ChatID: update.Message.Chat.ID, ReplyToMessageID: update.Message.MessageID},
|
BaseChat: tgbotapi.BaseChat{ChatID: update.Message.Chat.ID, ReplyToMessageID: update.Message.MessageID},
|
||||||
ParseMode: "html",
|
File: tgbotapi.FilePath("bloater.webp"),
|
||||||
DisableWebPagePreview: false,
|
}}
|
||||||
Text: "Who the fuck do you think you are telling me what to do?",
|
botIO.SendSticker(sticker, bot)
|
||||||
}
|
|
||||||
botIO.SendMessage(message, bot)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := strings.ToLower(update.Message.Command())
|
cmd := strings.ToLower(update.Message.Command())
|
||||||
|
|
Loading…
Reference in a new issue