Skip to content

Commit

Permalink
README example fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emberantz committed Oct 3, 2023
1 parent 49c7ea0 commit 627c067
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,22 @@ Discord API functions and to set callback functions for Discord events.
package main

import (
"fmt"


"github.com/Goscord/goscord/goscord"
"github.com/Goscord/goscord/goscord/discord"
"github.com/Goscord/goscord/goscord/gateway"
"github.com/Goscord/goscord/goscord/gateway/event"
"fmt"
"github.com/Goscord/goscord/goscord"
"github.com/Goscord/goscord/goscord/discord"
"github.com/Goscord/goscord/goscord/gateway"
"github.com/Goscord/goscord/goscord/gateway/event"
)

var client *gateway.Session

func main() {
fmt.Println("Starting...")
fmt.Println("Starting...")

client := goscord.New(&gateway.Options{
Token: "token",
Intents: gateway.IntentGuildMessages,
})
client := goscord.New(&gateway.Options{
Token: "token",
Intents: gateway.IntentGuildMessages,
})

client.On(event.EventReady, func() {
fmt.Println("Logged in as " + client.Me().Tag())
Expand All @@ -63,11 +61,11 @@ func main() {
}
})

client.Login()

client.Login()

select {}
select {}
}

```

See [documentation](https://goscord.dev/documentation) for more detailed information.
Expand Down

1 comment on commit 627c067

@szerookii
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??? @emberantz imagine reformatting it only

Please sign in to comment.