STOP USING PRINTF PLS
This commit is contained in:
parent
7b62921b4e
commit
c40b975354
1 changed files with 2 additions and 4 deletions
6
user.go
6
user.go
|
@ -1,7 +1,5 @@
|
||||||
package discordgo
|
package discordgo
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
// A User stores all data for an individual Discord user.
|
// A User stores all data for an individual Discord user.
|
||||||
type User struct {
|
type User struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
|
@ -17,10 +15,10 @@ type User struct {
|
||||||
|
|
||||||
// String returns a unique identifier of the form username#discriminator
|
// String returns a unique identifier of the form username#discriminator
|
||||||
func (u *User) String() string {
|
func (u *User) String() string {
|
||||||
return fmt.Sprintf("%s#%s", u.Username, u.Discriminator)
|
return u.Username + "#" + u.Discriminator
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mention return a string which mentions the user
|
// Mention return a string which mentions the user
|
||||||
func (u *User) Mention() string {
|
func (u *User) Mention() string {
|
||||||
return fmt.Sprintf("<@%s>", u.ID)
|
return "<@" + u.ID + ">"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue