@@ -121,7 +121,9 @@ type Draft struct {
|
||||
parseMode tgapi.ParseMode
|
||||
entities []tgapi.MessageEntity
|
||||
|
||||
ID uint64
|
||||
// ID uniquely identifies the draft within its provider.
|
||||
ID uint64
|
||||
// Message contains the current draft text.
|
||||
Message string
|
||||
}
|
||||
|
||||
@@ -221,6 +223,7 @@ func (d *Draft) Delete() {
|
||||
// If the draft is empty, Flush() returns nil without calling the API.
|
||||
func (d *Draft) Flush() error {
|
||||
if d.Message == "" {
|
||||
d.Delete()
|
||||
return nil
|
||||
}
|
||||
if d.chatID == 0 {
|
||||
|
||||
Reference in New Issue
Block a user