Added warning to New/Login functions fixes #342
This commit is contained in:
parent
2b80b35528
commit
5e2c93b4f1
2 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,12 @@ var ErrMFA = errors.New("account has 2FA enabled")
|
||||||
// With an email, password and auth token - Discord will verify the auth
|
// With an email, password and auth token - Discord will verify the auth
|
||||||
// token, if it is invalid it will sign in with the provided
|
// token, if it is invalid it will sign in with the provided
|
||||||
// credentials. This is the Discord recommended way to sign in.
|
// 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) {
|
func New(args ...interface{}) (s *Session, err error) {
|
||||||
|
|
||||||
// Create an empty Session interface.
|
// Create an empty Session interface.
|
||||||
|
|
|
@ -173,6 +173,12 @@ func unmarshal(data []byte, v interface{}) error {
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Login asks the Discord server for an authentication token.
|
// 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) {
|
func (s *Session) Login(email, password string) (err error) {
|
||||||
|
|
||||||
data := struct {
|
data := struct {
|
||||||
|
|
Loading…
Reference in a new issue