update versions and change to std logger
This commit is contained in:
parent
aa20d59a0f
commit
df441014ed
17 changed files with 212 additions and 147 deletions
|
@ -4,10 +4,11 @@ import (
|
|||
"fmt"
|
||||
"github.com/disgoorg/disgo/events"
|
||||
"grow.rievo.dev/discordBots/cmd/vcbot/helper"
|
||||
"log"
|
||||
)
|
||||
|
||||
func JoinEvent(event *events.GuildVoiceJoin) {
|
||||
event.Client().Logger().Debug("JoinEvent")
|
||||
log.Printf("DEBUG: JoinEvent")
|
||||
channelId := *event.VoiceState.ChannelID
|
||||
channel, _ := event.Client().Rest().GetChannel(channelId)
|
||||
channelName := channel.Name()
|
||||
|
@ -26,7 +27,7 @@ func MoveEvent(event *events.GuildVoiceMove) {
|
|||
// no that's not a move event
|
||||
return
|
||||
}
|
||||
event.Client().Logger().Debug("MoveEvent")
|
||||
log.Printf("DEBUG: MoveEvent")
|
||||
channelOldId := *event.OldVoiceState.ChannelID
|
||||
channelOld, _ := event.Client().Rest().GetChannel(channelOldId)
|
||||
channelOldName := channelOld.Name()
|
||||
|
@ -44,9 +45,9 @@ func MoveEvent(event *events.GuildVoiceMove) {
|
|||
}
|
||||
|
||||
func LeaveEvent(event *events.GuildVoiceLeave) {
|
||||
event.Client().Logger().Debug("LeaveEvent")
|
||||
log.Printf("DEBUG: LeaveEvent")
|
||||
if event.OldVoiceState.ChannelID == nil {
|
||||
event.Client().Logger().Error("OldVoiceState.ChannelID missing")
|
||||
log.Printf("ERROR: OldVoiceState.ChannelID missing")
|
||||
return
|
||||
}
|
||||
channelOldId := *event.OldVoiceState.ChannelID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue