• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Jun-2021-

.gitignoreH A D16-Jun-202131 32

.travis.ymlH A D16-Jun-2021324 1716

LICENSEH A D16-Jun-20211.4 KiB2922

README.mdH A D16-Jun-20214.3 KiB10669

discord.goH A D16-Jun-20215.1 KiB16285

endpoints.goH A D16-Jun-20219.7 KiB154119

event.goH A D16-Jun-20217 KiB248145

eventhandlers.goH A D16-Jun-202134.2 KiB1,055700

events.goH A D16-Jun-20217.1 KiB270167

go.modH A D16-Jun-2021156 96

go.sumH A D16-Jun-2021999 1110

interactions.goH A D16-Jun-20211.1 KiB5538

logging.goH A D16-Jun-20212.8 KiB10440

message.goH A D16-Jun-202114.5 KiB450265

mkdocs.ymlH A D16-Jun-2021345 1814

oauth2.goH A D16-Jun-20215.6 KiB174105

ratelimit.goH A D16-Jun-20214.9 KiB198140

restapi.goH A D16-Jun-202170.6 KiB2,3881,457

state.goH A D16-Jun-202123 KiB1,105819

structs.goH A D16-Jun-202145.9 KiB1,340832

types.goH A D16-Jun-20211.5 KiB5832

user.goH A D16-Jun-20213.3 KiB10754

util.goH A D16-Jun-2021371 1814

voice.goH A D16-Jun-202122.6 KiB909602

wsapi.goH A D16-Jun-202124.3 KiB902560

README.md

1# DiscordGo
2
3[![GoDoc](https://godoc.org/github.com/bwmarrin/discordgo?status.svg)](https://godoc.org/github.com/bwmarrin/discordgo) [![Go report](http://goreportcard.com/badge/bwmarrin/discordgo)](http://goreportcard.com/report/bwmarrin/discordgo) [![Build Status](https://travis-ci.org/bwmarrin/discordgo.svg?branch=master)](https://travis-ci.org/bwmarrin/discordgo) [![Discord Gophers](https://img.shields.io/badge/Discord%20Gophers-%23discordgo-blue.svg)](https://discord.gg/0f1SbxBZjYoCtNPP) [![Discord API](https://img.shields.io/badge/Discord%20API-%23go_discordgo-blue.svg)](https://discord.com/invite/discord-api)
4
5<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
6
7DiscordGo is a [Go](https://golang.org/) package that provides low level
8bindings to the [Discord](https://discord.com/) chat client API. DiscordGo
9has nearly complete support for all of the Discord API endpoints, websocket
10interface, and voice interface.
11
12If you would like to help the DiscordGo package please use
13[this link](https://discord.com/oauth2/authorize?client_id=173113690092994561&scope=bot)
14to add the official DiscordGo test bot **dgo** to your server. This provides
15indispensable help to this project.
16
17* See [dgVoice](https://github.com/bwmarrin/dgvoice) package for an example of
18additional voice helper functions and features for DiscordGo.
19
20* See [dca](https://github.com/bwmarrin/dca) for an **experimental** stand alone
21tool that wraps `ffmpeg` to create opus encoded audio appropriate for use with
22Discord (and DiscordGo).
23
24**For help with this package or general Go discussion, please join the [Discord
25Gophers](https://discord.gg/0f1SbxBZjYq9jLBk) chat server.**
26
27## Getting Started
28
29### Installing
30
31This assumes you already have a working Go environment, if not please see
32[this page](https://golang.org/doc/install) first.
33
34`go get` *will always pull the latest tagged release from the master branch.*
35
36```sh
37go get github.com/bwmarrin/discordgo
38```
39
40### Usage
41
42Import the package into your project.
43
44```go
45import "github.com/bwmarrin/discordgo"
46```
47
48Construct a new Discord client which can be used to access the variety of
49Discord API functions and to set callback functions for Discord events.
50
51```go
52discord, err := discordgo.New("Bot " + "authentication token")
53```
54
55See Documentation and Examples below for more detailed information.
56
57
58## Documentation
59
60**NOTICE**: This library and the Discord API are unfinished.
61Because of that there may be major changes to library in the future.
62
63The DiscordGo code is fairly well documented at this point and is currently
64the only documentation available.  Both GoDoc and GoWalker (below) present
65that information in a nice format.
66
67- [![GoDoc](https://godoc.org/github.com/bwmarrin/discordgo?status.svg)](https://godoc.org/github.com/bwmarrin/discordgo)
68- [![Go Walker](http://gowalker.org/api/v1/badge)](https://gowalker.org/github.com/bwmarrin/discordgo)
69- Hand crafted documentation coming eventually.
70
71
72## Examples
73
74Below is a list of examples and other projects using DiscordGo.  Please submit
75an issue if you would like your project added or removed from this list.
76
77- [DiscordGo Examples](https://github.com/bwmarrin/discordgo/tree/master/examples) - A collection of example programs written with DiscordGo
78- [Awesome DiscordGo](https://github.com/bwmarrin/discordgo/wiki/Awesome-DiscordGo) - A curated list of high quality projects using DiscordGo
79
80## Troubleshooting
81For help with common problems please reference the
82[Troubleshooting](https://github.com/bwmarrin/discordgo/wiki/Troubleshooting)
83section of the project wiki.
84
85
86## Contributing
87Contributions are very welcomed, however please follow the below guidelines.
88
89- First open an issue describing the bug or enhancement so it can be
90discussed.
91- Try to match current naming conventions as closely as possible.
92- This package is intended to be a low level direct mapping of the Discord API,
93so please avoid adding enhancements outside of that scope without first
94discussing it.
95- Create a Pull Request with your changes against the master branch.
96
97
98## List of Discord APIs
99
100See [this chart](https://abal.moe/Discord/Libraries.html) for a feature
101comparison and list of other Discord API libraries.
102
103## Special Thanks
104
105[Chris Rhodes](https://github.com/iopred) - For the DiscordGo logo and tons of PRs.
106