main.go 534 B

1234567891011121314151617181920212223242526272829303132
  1. package main
  2. import (
  3. "flag"
  4. "fmt"
  5. "github.com/bwmarrin/discordgo"
  6. )
  7. var (
  8. Email string
  9. Password string
  10. )
  11. func init() {
  12. flag.StringVar(&Email, "e", "", "Account Email")
  13. flag.StringVar(&Password, "p", "", "Account Password")
  14. flag.Parse()
  15. }
  16. func main() {
  17. // Create a new Discord session using the provided login information.
  18. dg, err := discordgo.New(Email, Password)
  19. if err != nil {
  20. fmt.Println("error creating Discord session,", err)
  21. return
  22. }
  23. fmt.Printf("Your Authentication Token is:\n\n%s\n", dg.Token)
  24. }