Major Refactor (#2)
* Major reworks * More refactoring * Refactor feature complete! * Comments * Add versioning
This commit is contained in:
20
discord/user.go
Normal file
20
discord/user.go
Normal file
@ -0,0 +1,20 @@
|
||||
package discord
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/yeslayla/birdbot/core"
|
||||
)
|
||||
|
||||
// NewUser creates a new user object from a discordgo.User object
|
||||
func NewUser(user *discordgo.User) *core.User {
|
||||
if user == nil {
|
||||
log.Print("Cannot user object, user is nil!")
|
||||
return nil
|
||||
}
|
||||
|
||||
return &core.User{
|
||||
ID: user.ID,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user