Explorar o código

Add Member.Mention

necro %!s(int64=6) %!d(string=hai) anos
pai
achega
e5c968d7a6
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      structs.go

+ 5 - 0
structs.go

@@ -602,6 +602,11 @@ type Member struct {
 	Roles []string `json:"roles"`
 }
 
+// Mention creates a member mention
+func (m *Member) Mention() string {
+	return "<@!" + m.User.ID + ">"
+}
+
 // A Settings stores data for a specific users Discord client settings.
 type Settings struct {
 	RenderEmbeds           bool               `json:"render_embeds"`