Skip to content

Commit

Permalink
fix: using send reply not work
Browse files Browse the repository at this point in the history
  • Loading branch information
MoYoez committed Mar 11, 2024
1 parent d6718e5 commit 2c55b40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ func (ctx *Ctx) CheckSession() Rule {
// if replytosender {
// c.ReplyToMessageID = ctx.Message.MessageID
// }
func (ctx *Ctx) Send(replytosender bool, c tgba.Chattable) (tgba.Message, error) {
func (ctx *Ctx) Send(replytosender bool, c tgba.Chattable, parameters tgba.ReplyParameters) (tgba.Message, error) {
msg := reflect.ValueOf(c).Elem()
msg.FieldByName("ChatID").SetInt(ctx.Message.Chat.ID)
if replytosender {
msg.FieldByName("ReplyToMessageID").SetInt(int64(ctx.Message.MessageID))
// ctx.Message.MessageID
msg.FieldByName("ReplyParameters").FieldByName("MessageID").SetInt(int64(ctx.Message.MessageID))
}
return ctx.Caller.Send(c)
}
Expand Down

0 comments on commit 2c55b40

Please sign in to comment.