some fixes
This commit is contained in:
parent
f203e3e056
commit
8f96244634
13
bot.go
13
bot.go
@ -6,20 +6,19 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"scurotgbot/utils"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Bot struct {
|
||||
token string
|
||||
logger *utils.Logger
|
||||
logger *Logger
|
||||
debug bool
|
||||
|
||||
plugins []*Plugin
|
||||
prefixes []string
|
||||
|
||||
updateOffset int
|
||||
updateQueue *utils.Queue[*Update]
|
||||
updateQueue *Queue[*Update]
|
||||
}
|
||||
|
||||
type MsgContext struct {
|
||||
@ -31,9 +30,9 @@ type MsgContext struct {
|
||||
}
|
||||
|
||||
func NewBot(token string) *Bot {
|
||||
logger := utils.Create()
|
||||
logger.SetLevel(utils.DEBUG)
|
||||
updateQueue := utils.CreateQueue[*Update](256)
|
||||
logger := CreateLogger()
|
||||
logger.SetLevel(DEBUG)
|
||||
updateQueue := CreateQueue[*Update](256)
|
||||
bot := &Bot{
|
||||
updateOffset: 0, plugins: make([]*Plugin, 0), debug: false,
|
||||
prefixes: make([]string, 0),
|
||||
@ -124,7 +123,7 @@ func (b *Bot) SetDebug(debug bool) {
|
||||
b.debug = debug
|
||||
}
|
||||
|
||||
func (b *Bot) GetQueue() *utils.Queue[*Update] {
|
||||
func (b *Bot) GetQueue() *Queue[*Update] {
|
||||
return b.updateQueue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user