Skip to content

xackery/go-discord

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord client for Go

or The only Discord library that doesn't start with a D

godoc badge Go report

API calls largely inspired by the Discord python client discord.py. (thanks)

Some methods may be pretty chaotic but I'm no Go expert and hope it will do for now.

An usage example can be found in the main.go file.

import (
    "log"

    "github.com/gdraynz/go-discord/discord"
)

func messageReceived(message discord.Message) {
    log.Printf("%s : %s",
        message.Author.Name,
        message.Content,
    )
}

func main() {
    client := discord.Client{
        OnMessageReceived: messageReceived,
    }

    if err := client.Login("email", "password"); err != nil {
        log.Fatal(err)
    }

    client.Run()
}

I'm not putting a lot of time on it, here are many other implementations in different languages :

About

Discord client for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%