Parcourir la source

Revert "Changed domain from `discordapp.com` to `discord.com` (#769)"

This reverts commit f4ca8874a38e566b7693170c8c759cac32428623.
Carson Hoffman il y a 4 ans
Parent
commit
45124d8303
8 fichiers modifiés avec 16 ajouts et 20 suppressions
  1. 3 3
      README.md
  2. 3 3
      docs/GettingStarted.md
  3. 3 3
      docs/index.md
  4. 2 2
      endpoints.go
  5. 1 1
      event.go
  6. 1 1
      examples/appmaker/README.md
  7. 2 2
      restapi.go
  8. 1 5
      wsapi.go

Fichier diff supprimé car celui-ci est trop grand
+ 3 - 3
README.md


+ 3 - 3
docs/GettingStarted.md

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

+ 3 - 3
docs/index.md

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

+ 2 - 2
endpoints.go

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

+ 1 - 1
event.go

@@ -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
-// library for each event: https://discord.com/developers/docs/topics/gateway#event-names
+// library for each event: https://discordapp.com/developers/docs/topics/gateway#event-names
 // There are also synthetic events fired by the library internally which are
 // available for handling, like Connect, Disconnect, and RateLimit.
 // events.go contains all of the Discord WSAPI and synthetic events that can be handled.

+ 1 - 1
examples/appmaker/README.md

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

+ 2 - 2
restapi.go

@@ -38,7 +38,7 @@ var (
 	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")
 	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://discord.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://discordapp.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
@@ -506,7 +506,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions
 }
 
 // Calculates the permissions for a member.
-// https://support.discord.com/hc/en-us/articles/206141927-How-is-the-permission-hierarchy-structured-
+// https://support.discordapp.com/hc/en-us/articles/206141927-How-is-the-permission-hierarchy-structured-
 func memberPermissions(guild *Guild, channel *Channel, member *Member) (apermissions int) {
 	userID := member.User.ID
 

+ 1 - 5
wsapi.go

@@ -46,7 +46,7 @@ type resumePacket struct {
 }
 
 // Open creates a websocket connection to Discord.
-// See: https://discord.com/developers/docs/topics/gateway#connecting
+// See: https://discordapp.com/developers/docs/topics/gateway#connecting
 func (s *Session) Open() error {
 	s.log(LogInformational, "called")
 
@@ -838,10 +838,6 @@ func (s *Session) reconnect() {
 	}
 }
 
-func (s *Session) Close() error {
-	return s.CloseWithCode(websocket.CloseNormalClosure)
-}
-
 // Close closes a websocket and stops all listening/heartbeat goroutines.
 // TODO: Add support for Voice WS/UDP
 func (s *Session) Close() error {