Skip to content

Commit 974680f

Browse files
authored
Update main.go (#50)
1 parent c698617 commit 974680f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

telegram-bot/main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,14 @@ func main() {
223223
case "paste":
224224
paste(ID, update.Message)
225225
default:
226-
bot.Send(tbot.NewMessage(ID, "I don't know that command"))
226+
{
227+
msg, err := bot.Send(tbot.NewMessage(ID, "I don't know this command"))
228+
log.Print(err)
229+
timer1 := time.NewTimer(5 * time.Second)
230+
<-timer1.C
231+
232+
bot.DeleteMessage(tbot.NewDeleteMessage(ID, msg.MessageID))
233+
}
227234
}
228235
}
229236
if update.Message.NewChatMembers != nil {

0 commit comments

Comments
 (0)