Check the session pointer for nil before calling session.connected
This commit is contained in:
parent
bbcf6ef6cf
commit
8b54f09a95
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ func Close() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Connected() bool {
|
func Connected() bool {
|
||||||
return session.connected
|
return session != nil && session.connected
|
||||||
}
|
}
|
||||||
|
|
||||||
func User(uid string) (*discordgo.User, error) {
|
func User(uid string) (*discordgo.User, error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue