mirror of
https://github.com/appleboy/drone-telegram.git
synced 2026-06-14 22:11:12 +08:00
@@ -39,6 +39,7 @@ type (
|
||||
Photo []string
|
||||
Document []string
|
||||
Sticker []string
|
||||
Audio []string
|
||||
Format string
|
||||
}
|
||||
|
||||
@@ -124,6 +125,7 @@ func (p Plugin) Exec() error {
|
||||
photos := fileExist(trimElement(p.Config.Photo))
|
||||
documents := fileExist(trimElement(p.Config.Document))
|
||||
stickers := fileExist(trimElement(p.Config.Sticker))
|
||||
audios := fileExist(trimElement(p.Config.Audio))
|
||||
|
||||
// send message.
|
||||
for _, user := range ids {
|
||||
@@ -147,6 +149,12 @@ func (p Plugin) Exec() error {
|
||||
msg := tgbotapi.NewStickerUpload(user, value)
|
||||
p.Send(bot, msg)
|
||||
}
|
||||
|
||||
for _, value := range audios {
|
||||
msg := tgbotapi.NewAudioUpload(user, value)
|
||||
msg.Title = "Audio Message."
|
||||
p.Send(bot, msg)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user