github.com/meowstercatel/discordgo@v0.0.0-20250615204139-29b43d676735/README.md (about)

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