Skip to content

Commit

Permalink
πŸ“ Update quick docs
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarbar338 committed Jul 22, 2021
1 parent 1833495 commit e2017ed
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ package main

import (
"fmt"

"github.com/barbarbar338/go-lanyard"
)

func main() {
// User ID here πŸ‘‡
res := FetchUser("331846231514939392")
res := lanyard.FetchUser("331846231514939392")

// handle presence data here
fmt.Println(res.Data.DiscordStatus)
Expand All @@ -44,14 +46,14 @@ import (
"os/signal"
"syscall"

"github.com/barbarbar338/go-lanyard"
"github.com/barbarbar338/go-lanyard"
)

func main() {
// User ID here πŸ‘‡
ws := lanyard.CreateWS("331846231514939392", func(data *LanyardData) {
// User ID here πŸ‘‡
ws := lanyard.CreateWS("331846231514939392", func(data *lanyard.LanyardData) {

// handle presence data here
// handle presence data here
fmt.Println(data.DiscordStatus)
})

Expand All @@ -66,7 +68,7 @@ func main() {

fmt.Println("Closing client.")

// destroy ws before exit
// destroy ws before exit
ws.Destroy()
}
```
Expand Down

0 comments on commit e2017ed

Please sign in to comment.