mirror of
https://github.com/MedzikUser/go-cdn
synced 2024-08-15 03:19:36 +00:00
- Discord Bot: Added YML config and moved bot settings from DB to this file - Error logs names has been renames - Discord Bot: Added upload from multi attachments - Update README, Makefile, go.mod and .gitignore
16 lines
318 B
Go
16 lines
318 B
Go
package discord
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/andersfylling/disgord"
|
|
"gitlab.com/gaming0skar123/go/cdn/common"
|
|
)
|
|
|
|
func deleteMsg(s disgord.Session, m *disgord.Message, t time.Duration) {
|
|
go func() {
|
|
time.Sleep(t)
|
|
err := s.Channel(m.ChannelID).Message(m.ID).Delete()
|
|
common.CheckErr(err, "delete msg")
|
|
}()
|
|
}
|