discordapp.com -> discord.com (#772)

Change API URL from discordapp.com to discord.com
This commit is contained in:
Noah Santschi-Cooney 2020-05-09 02:26:13 +01:00 committed by GitHub
parent b7d79c80d6
commit 69edfdf4ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 23 deletions

View file

@ -1,16 +1,16 @@
# DiscordGo # DiscordGo
[![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://discordapp.com/invite/discord-api) [![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)
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png"> <img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
DiscordGo is a [Go](https://golang.org/) package that provides low level DiscordGo is a [Go](https://golang.org/) package that provides low level
bindings to the [Discord](https://discordapp.com/) chat client API. DiscordGo bindings to the [Discord](https://discord.com/) chat client API. DiscordGo
has nearly complete support for all of the Discord API endpoints, websocket has nearly complete support for all of the Discord API endpoints, websocket
interface, and voice interface. interface, and voice interface.
If you would like to help the DiscordGo package please use If you would like to help the DiscordGo package please use
[this link](https://discordapp.com/oauth2/authorize?client_id=173113690092994561&scope=bot) [this link](https://discord.com/oauth2/authorize?client_id=173113690092994561&scope=bot)
to add the official DiscordGo test bot **dgo** to your server. This provides to add the official DiscordGo test bot **dgo** to your server. This provides
indispensable help to this project. indispensable help to this project.

View file

@ -58,7 +58,7 @@ support multi-server voice connections and some other features that are
exclusive to Bot accounts only. exclusive to Bot accounts only.
To create a new user account (if you have not done so already) visit the To create a new user account (if you have not done so already) visit the
[Discord](https://discordapp.com/) website and click on the [Discord](https://discord.com/) website and click on the
**Try Discord Now, It's Free** button then follow the steps to setup your **Try Discord Now, It's Free** button then follow the steps to setup your
new account. new account.
@ -77,12 +77,12 @@ have access to some user client specific features however they gain access to
many Bot specific features. many Bot specific features.
To create a new bot account first create yourself a normal user account on To create a new bot account first create yourself a normal user account on
Discord then visit the [My Applications](https://discordapp.com/developers/applications/me) Discord then visit the [My Applications](https://discord.com/developers/applications/me)
page and click on the **New Application** box. Follow the prompts from there page and click on the **New Application** box. Follow the prompts from there
to finish creating your account. to finish creating your account.
**More information about Bots vs Client accounts can be found [here](https://discordapp.com/developers/docs/topics/oauth2#bot-vs-user-accounts)** **More information about Bots vs Client accounts can be found [here](https://discord.com/developers/docs/topics/oauth2#bot-vs-user-accounts)**
# Requirements # Requirements

View file

@ -2,12 +2,12 @@
<hr> <hr>
<img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png"> <img align="right" src="http://bwmarrin.github.io/discordgo/img/discordgo.png">
[Go](https://golang.org/) (golang) interface for the [Discord](https://discordapp.com/) [Go](https://golang.org/) (golang) interface for the [Discord](https://discord.com/)
chat service. Provides both low-level direct bindings to the chat service. Provides both low-level direct bindings to the
Discord API and helper functions that allow you to make custom clients and chat Discord API and helper functions that allow you to make custom clients and chat
bot applications easily. bot applications easily.
[Discord](https://discordapp.com/) is an all-in-one voice and text chat for [Discord](https://discord.com/) is an all-in-one voice and text chat for
gamers that's free, secure, and works on both your desktop and phone. gamers that's free, secure, and works on both your desktop and phone.
### Why DiscordGo? ### Why DiscordGo?
@ -30,4 +30,4 @@ information and support for DiscordGo. There's also a chance to make some
friends :) friends :)
* Join the [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP) chat server dedicated to Go programming. * Join the [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP) chat server dedicated to Go programming.
* Join the [Discord API](https://discordapp.com/invite/discord-API) chat server dedicated to the Discord API. * Join the [Discord API](https://discord.com/invite/discord-API) chat server dedicated to the Discord API.

View file

@ -18,12 +18,12 @@ var APIVersion = "6"
// Known Discord API Endpoints. // Known Discord API Endpoints.
var ( var (
EndpointStatus = "https://status.discordapp.com/api/v2/" EndpointStatus = "https://status.discord.com/api/v2/"
EndpointSm = EndpointStatus + "scheduled-maintenances/" EndpointSm = EndpointStatus + "scheduled-maintenances/"
EndpointSmActive = EndpointSm + "active.json" EndpointSmActive = EndpointSm + "active.json"
EndpointSmUpcoming = EndpointSm + "upcoming.json" EndpointSmUpcoming = EndpointSm + "upcoming.json"
EndpointDiscord = "https://discordapp.com/" EndpointDiscord = "https://discord.com/"
EndpointAPI = EndpointDiscord + "api/v" + APIVersion + "/" EndpointAPI = EndpointDiscord + "api/v" + APIVersion + "/"
EndpointGuilds = EndpointAPI + "guilds/" EndpointGuilds = EndpointAPI + "guilds/"
EndpointChannels = EndpointAPI + "channels/" EndpointChannels = EndpointAPI + "channels/"

View file

@ -110,7 +110,7 @@ func (s *Session) addEventHandlerOnce(eventHandler EventHandler) func() {
// }) // })
// //
// List of events can be found at this page, with corresponding names in the // List of events can be found at this page, with corresponding names in the
// library for each event: https://discordapp.com/developers/docs/topics/gateway#event-names // library for each event: https://discord.com/developers/docs/topics/gateway#event-names
// There are also synthetic events fired by the library internally which are // There are also synthetic events fired by the library internally which are
// available for handling, like Connect, Disconnect, and RateLimit. // available for handling, like Connect, Disconnect, and RateLimit.
// events.go contains all of the Discord WSAPI and synthetic events that can be handled. // events.go contains all of the Discord WSAPI and synthetic events that can be handled.

View file

@ -6,7 +6,7 @@ This example demonstrates how to utilize DiscordGo to create, view, and delete
Bot Applications on your account. Bot Applications on your account.
These tasks are normally accomplished from the These tasks are normally accomplished from the
[Discord Developers](https://discordapp.com/developers/applications/me) site. [Discord Developers](https://discord.com/developers/applications/me) site.
**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP) **Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP)
Discord chat channel for support.** Discord chat channel for support.**

View file

@ -38,7 +38,7 @@ var (
ErrPruneDaysBounds = errors.New("the number of days should be more than or equal to 1") ErrPruneDaysBounds = errors.New("the number of days should be more than or equal to 1")
ErrGuildNoIcon = errors.New("guild does not have an icon set") ErrGuildNoIcon = errors.New("guild does not have an icon set")
ErrGuildNoSplash = errors.New("guild does not have a splash set") ErrGuildNoSplash = errors.New("guild does not have a splash set")
ErrUnauthorized = errors.New("HTTP request was unauthorized. This could be because the provided token was not a bot token. Please add \"Bot \" to the start of your token. https://discordapp.com/developers/docs/reference#authentication-example-bot-token-authorization-header") ErrUnauthorized = errors.New("HTTP request was unauthorized. This could be because the provided token was not a bot token. Please add \"Bot \" to the start of your token. https://discord.com/developers/docs/reference#authentication-example-bot-token-authorization-header")
) )
// Request is the same as RequestWithBucketID but the bucket id is the same as the urlStr // Request is the same as RequestWithBucketID but the bucket id is the same as the urlStr
@ -506,7 +506,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions
} }
// Calculates the permissions for a member. // Calculates the permissions for a member.
// https://support.discordapp.com/hc/en-us/articles/206141927-How-is-the-permission-hierarchy-structured- // https://support.discord.com/hc/en-us/articles/206141927-How-is-the-permission-hierarchy-structured-
func memberPermissions(guild *Guild, channel *Channel, member *Member) (apermissions int) { func memberPermissions(guild *Guild, channel *Channel, member *Member) (apermissions int) {
userID := member.User.ID userID := member.User.ID

View file

@ -42,7 +42,7 @@ type Session struct {
ShouldReconnectOnError bool ShouldReconnectOnError bool
// Identify is sent during initial handshake with the discord gateway. // Identify is sent during initial handshake with the discord gateway.
// https://discordapp.com/developers/docs/topics/gateway#identify // https://discord.com/developers/docs/topics/gateway#identify
Identify Identify Identify Identify
// TODO: Remove Below, Deprecated, Use Identify struct // TODO: Remove Below, Deprecated, Use Identify struct
@ -919,7 +919,7 @@ type GatewayBotResponse struct {
} }
// GatewayStatusUpdate is sent by the client to indicate a presence or status update // GatewayStatusUpdate is sent by the client to indicate a presence or status update
// https://discordapp.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure // https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure
type GatewayStatusUpdate struct { type GatewayStatusUpdate struct {
Since int `json:"since"` Since int `json:"since"`
Game Activity `json:"game"` Game Activity `json:"game"`
@ -928,7 +928,7 @@ type GatewayStatusUpdate struct {
} }
// Activity defines the Activity sent with GatewayStatusUpdate // Activity defines the Activity sent with GatewayStatusUpdate
// https://discordapp.com/developers/docs/topics/gateway#activity-object // https://discord.com/developers/docs/topics/gateway#activity-object
type Activity struct { type Activity struct {
Name string Name string
Type ActivityType Type ActivityType
@ -936,11 +936,11 @@ type Activity struct {
} }
// ActivityType is the type of Activity (see ActivityType* consts) in the Activity struct // ActivityType is the type of Activity (see ActivityType* consts) in the Activity struct
// https://discordapp.com/developers/docs/topics/gateway#activity-object-activity-types // https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
type ActivityType int type ActivityType int
// Valid ActivityType values // Valid ActivityType values
// https://discordapp.com/developers/docs/topics/gateway#activity-object-activity-types // https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
const ( const (
ActivityTypeGame GameType = iota ActivityTypeGame GameType = iota
ActivityTypeStreaming ActivityTypeStreaming
@ -950,7 +950,7 @@ const (
) )
// Identify is sent during initial handshake with the discord gateway. // Identify is sent during initial handshake with the discord gateway.
// https://discordapp.com/developers/docs/topics/gateway#identify // https://discord.com/developers/docs/topics/gateway#identify
type Identify struct { type Identify struct {
Token string `json:"token"` Token string `json:"token"`
Properties IdentifyProperties `json:"properties"` Properties IdentifyProperties `json:"properties"`
@ -962,7 +962,7 @@ type Identify struct {
} }
// IdentifyProperties contains the "properties" portion of an Identify packet // IdentifyProperties contains the "properties" portion of an Identify packet
// https://discordapp.com/developers/docs/topics/gateway#identify-identify-connection-properties // https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
type IdentifyProperties struct { type IdentifyProperties struct {
OS string `json:"$os"` OS string `json:"$os"`
Browser string `json:"$browser"` Browser string `json:"$browser"`

View file

@ -46,7 +46,7 @@ type resumePacket struct {
} }
// Open creates a websocket connection to Discord. // Open creates a websocket connection to Discord.
// See: https://discordapp.com/developers/docs/topics/gateway#connecting // See: https://discord.com/developers/docs/topics/gateway#connecting
func (s *Session) Open() error { func (s *Session) Open() error {
s.log(LogInformational, "called") s.log(LogInformational, "called")