Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
docs/ | H | 05-Feb-2021 | - | 116 | 85 | |
examples/ | H | 05-Feb-2021 | - | 760 | 534 | |
tools/cmd/eventhandlers/ | H | 05-Feb-2021 | - | 125 | 97 | |
.gitignore | H A D | 05-Feb-2021 | 31 | 3 | 2 | |
.travis.yml | H A D | 05-Feb-2021 | 324 | 17 | 16 | |
LICENSE | H A D | 05-Feb-2021 | 1.4 KiB | 29 | 22 | |
README.md | H A D | 05-Feb-2021 | 4.3 KiB | 106 | 69 | |
discord.go | H A D | 05-Feb-2021 | 5.1 KiB | 162 | 85 | |
discord_test.go | H A D | 05-Feb-2021 | 5.1 KiB | 204 | 140 | |
endpoints.go | H A D | 05-Feb-2021 | 9.7 KiB | 154 | 119 | |
event.go | H A D | 05-Feb-2021 | 7 KiB | 248 | 145 | |
eventhandlers.go | H A D | 05-Feb-2021 | 34.2 KiB | 1,055 | 700 | |
events.go | H A D | 05-Feb-2021 | 7.1 KiB | 270 | 167 | |
go.mod | H A D | 05-Feb-2021 | 152 | 9 | 6 | |
go.sum | H A D | 05-Feb-2021 | 388 | 5 | 4 | |
interactions.go | H A D | 05-Feb-2021 | 1.1 KiB | 55 | 38 | |
interactions_test.go | H A D | 05-Feb-2021 | 2 KiB | 69 | 57 | |
logging.go | H A D | 05-Feb-2021 | 2.8 KiB | 104 | 40 | |
message.go | H A D | 05-Feb-2021 | 14.5 KiB | 450 | 265 | |
message_test.go | H A D | 05-Feb-2021 | 869 | 41 | 36 | |
mkdocs.yml | H A D | 05-Feb-2021 | 345 | 18 | 14 | |
oauth2.go | H A D | 05-Feb-2021 | 5.6 KiB | 174 | 105 | |
oauth2_test.go | H A D | 05-Feb-2021 | 1.4 KiB | 58 | 37 | |
ratelimit.go | H A D | 05-Feb-2021 | 4.9 KiB | 198 | 140 | |
ratelimit_test.go | H A D | 05-Feb-2021 | 2.9 KiB | 114 | 80 | |
restapi.go | H A D | 05-Feb-2021 | 69.9 KiB | 2,342 | 1,415 | |
restapi_test.go | H A D | 05-Feb-2021 | 5.6 KiB | 288 | 157 | |
state.go | H A D | 05-Feb-2021 | 23 KiB | 1,105 | 819 | |
structs.go | H A D | 05-Feb-2021 | 45.9 KiB | 1,340 | 832 | |
types.go | H A D | 05-Feb-2021 | 1.5 KiB | 58 | 32 | |
types_test.go | H A D | 05-Feb-2021 | 467 | 25 | 21 | |
user.go | H A D | 05-Feb-2021 | 3.3 KiB | 107 | 54 | |
user_test.go | H A D | 05-Feb-2021 | 239 | 17 | 12 | |
util.go | H A D | 05-Feb-2021 | 371 | 18 | 14 | |
util_test.go | H A D | 05-Feb-2021 | 510 | 22 | 16 | |
voice.go | H A D | 05-Feb-2021 | 22.6 KiB | 909 | 602 | |
wsapi.go | H A D | 05-Feb-2021 | 24.3 KiB | 902 | 560 |
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