Sfoglia il codice sorgente

Added PrivateChannels function example

Bruce Marriner 9 anni fa
parent
commit
9abd4e829a
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      _examples/demo.go

+ 5 - 0
_examples/demo.go

@@ -41,6 +41,11 @@ func main() {
 	user, err := discord.Users(&session, "@me")
 	fmt.Println(user)
 
+	// Use the PrivateChannels function to get a list of PrivateChannels
+	// for a given user.
+	private, err := discord.PrivateChannels(&session, "@me")
+	fmt.Println(private)
+
 	// Use the Servers function to pull all available servers for a given user
 	// This returns a Server structure
 	servers, err := discord.Servers(&session, "@me")