Compentize Workload (#4)
This commit is contained in:
18
common/user.go
Normal file
18
common/user.go
Normal file
@ -0,0 +1,18 @@
|
||||
package common
|
||||
|
||||
import "fmt"
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
AvatarURL string
|
||||
DisplayName string
|
||||
}
|
||||
|
||||
// DiscordMention generated a Discord mention string for the user
|
||||
func (user *User) DiscordMention() string {
|
||||
if user == nil {
|
||||
return "<NULL>"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("<@%s>", user.ID)
|
||||
}
|
Reference in New Issue
Block a user