Check the session pointer for nil before calling session.connected

This commit is contained in:
Piper Pentagram 2024-11-08 16:33:49 -08:00
parent bbcf6ef6cf
commit 8b54f09a95

View file

@ -52,7 +52,7 @@ func Close() {
}
func Connected() bool {
return session.connected
return session != nil && session.connected
}
func User(uid string) (*discordgo.User, error) {