chat actions and file uploading; v0.3.7
This commit is contained in:
@@ -119,8 +119,8 @@ func (ctx *MsgContext) answerPhoto(photoId, text string, kb *InlineKeyboard) *An
|
||||
params := &SendPhotoP{
|
||||
ChatID: ctx.Msg.Chat.ID,
|
||||
Caption: text,
|
||||
Photo: photoId,
|
||||
ParseMode: ParseMD,
|
||||
Photo: photoId,
|
||||
}
|
||||
if kb != nil {
|
||||
params.ReplyMarkup = kb.Get()
|
||||
@@ -184,6 +184,15 @@ func (ctx *MsgContext) AnswerCbQueryUrl(u string) {
|
||||
ctx.answerCallbackQuery(u, "", false)
|
||||
}
|
||||
|
||||
func (ctx *MsgContext) SendAction(action ChatActions) {
|
||||
_, err := ctx.Bot.SendChatAction(SendChatActionP{
|
||||
ChatID: ctx.Msg.Chat.ID, Action: action,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.Bot.logger.Errorln(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (ctx *MsgContext) error(err error) {
|
||||
text := fmt.Sprintf(ctx.Bot.errorTemplate, EscapeMarkdown(err.Error()))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user