|
|
|
@ -73,13 +73,13 @@ type Context interface {
|
|
|
|
|
// See Forward from bot.go
|
|
|
|
|
ForwardTo(to Recipient, opts ...interface{}) error
|
|
|
|
|
|
|
|
|
|
// Edit edits the current message.
|
|
|
|
|
// Edit edits the given message omitting result.
|
|
|
|
|
// See Edit from bot.go.
|
|
|
|
|
Edit(what interface{}, opts ...interface{}) error
|
|
|
|
|
Edit(msg Editable, what interface{}, opts ...interface{}) error
|
|
|
|
|
|
|
|
|
|
// EditCaption edits the caption of the current message.
|
|
|
|
|
// EditCaption edits the caption of the given message.
|
|
|
|
|
// See EditCaption from bot.go.
|
|
|
|
|
EditCaption(caption string, opts ...interface{}) error
|
|
|
|
|
EditCaption(msg Editable, caption string, opts ...interface{}) error
|
|
|
|
|
|
|
|
|
|
// Delete removes the current message.
|
|
|
|
|
// See Delete from bot.go.
|
|
|
|
@ -243,20 +243,12 @@ func (c *nativeContext) ForwardTo(to Recipient, opts ...interface{}) error {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *nativeContext) Edit(what interface{}, opts ...interface{}) error {
|
|
|
|
|
msg := c.Message()
|
|
|
|
|
if msg == nil {
|
|
|
|
|
return ErrBadContext
|
|
|
|
|
}
|
|
|
|
|
func (c *nativeContext) Edit(msg Editable, what interface{}, opts ...interface{}) error {
|
|
|
|
|
_, err := c.b.Edit(msg, what, opts...)
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *nativeContext) EditCaption(caption string, opts ...interface{}) error {
|
|
|
|
|
msg := c.Message()
|
|
|
|
|
if msg == nil {
|
|
|
|
|
return ErrBadContext
|
|
|
|
|
}
|
|
|
|
|
func (c *nativeContext) EditCaption(msg Editable, caption string, opts ...interface{}) error {
|
|
|
|
|
_, err := c.b.EditCaption(msg, caption, opts...)
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|