Browse Source

Added warning to New/Login functions fixes #342

Bruce 7 years ago
parent
commit
5e2c93b4f1
2 changed files with 12 additions and 0 deletions
  1. 6 0
      discord.go
  2. 6 0
      restapi.go

+ 6 - 0
discord.go

@@ -39,6 +39,12 @@ var ErrMFA = errors.New("account has 2FA enabled")
 //     With an email, password and auth token - Discord will verify the auth
 //         token, if it is invalid it will sign in with the provided
 //         credentials. This is the Discord recommended way to sign in.
+//
+// NOTE: While email/pass authentication is supported by DiscordGo it is
+// HIGHLY DISCOURAGED by Discord. Please only use email/pass to obtain a token
+// and then use that authentication token for all future connections.
+// Also, doing any form of automation with a user (non Bot) account may result
+// in that account being permanently banned from Discord.
 func New(args ...interface{}) (s *Session, err error) {
 
 	// Create an empty Session interface.

+ 6 - 0
restapi.go

@@ -173,6 +173,12 @@ func unmarshal(data []byte, v interface{}) error {
 // ------------------------------------------------------------------------------------------------
 
 // Login asks the Discord server for an authentication token.
+//
+// NOTE: While email/pass authentication is supported by DiscordGo it is
+// HIGHLY DISCOURAGED by Discord. Please only use email/pass to obtain a token
+// and then use that authentication token for all future connections.
+// Also, doing any form of automation with a user (non Bot) account may result
+// in that account being permanently banned from Discord.
 func (s *Session) Login(email, password string) (err error) {
 
 	data := struct {