adds dealsbot
This commit is contained in:
parent
2a05323f6f
commit
3a3dea453d
14 changed files with 1190 additions and 13 deletions
|
@ -21,7 +21,7 @@ var (
|
|||
)
|
||||
|
||||
func main() {
|
||||
log.SetLevel(log.LevelInfo)
|
||||
log.SetLevel(log.LevelDebug)
|
||||
log.Info("starting tempbot...")
|
||||
log.Info("disgo version: ", disgo.Version)
|
||||
|
||||
|
@ -61,13 +61,15 @@ func main() {
|
|||
|
||||
// delete messages older then x min in channel
|
||||
|
||||
ticker := time.NewTicker(5 * time.Minute)
|
||||
ticker := time.NewTicker(1 * time.Minute)
|
||||
quit := make(chan struct{})
|
||||
go func() {
|
||||
client.Logger().Debug("does it even run")
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
messages, err := client.Rest().GetMessages(channelTempID, 0, 0, 0, 100)
|
||||
client.Logger().Info(len(messages))
|
||||
if err != nil {
|
||||
client.Logger().Error("error getting messages: ", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue