diff --git a/examples/airhorn/README.md b/examples/airhorn/README.md index 44f4d52..984fd6b 100644 --- a/examples/airhorn/README.md +++ b/examples/airhorn/README.md @@ -21,13 +21,13 @@ cp ../src/github.com/bwmarrin/discordgo/examples/airhorn/airhorn.dca . ``` Usage of ./airhorn: -t string - Account Token + Bot Token ``` The below example shows how to start the bot. ```sh -./airhorn -t "Bot YOUR_BOT_TOKEN" +./airhorn -t YOUR_BOT_TOKEN ``` ### Creating sounds diff --git a/examples/airhorn/main.go b/examples/airhorn/main.go index 28211e9..ff5e521 100644 --- a/examples/airhorn/main.go +++ b/examples/airhorn/main.go @@ -13,7 +13,7 @@ import ( ) func init() { - flag.StringVar(&token, "t", "", "Account Token") + flag.StringVar(&token, "t", "", "Bot Token") flag.Parse() } @@ -34,8 +34,8 @@ func main() { return } - // Create a new Discord session using the provided token. - dg, err := discordgo.New(token) + // Create a new Discord session using the provided bot token. + dg, err := discordgo.New("Bot " + token) if err != nil { fmt.Println("Error creating Discord session: ", err) return diff --git a/examples/avatar/localfile/README.md b/examples/avatar/localfile/README.md index cf15472..1e2bf29 100644 --- a/examples/avatar/localfile/README.md +++ b/examples/avatar/localfile/README.md @@ -34,7 +34,7 @@ Usage of ./ocalfile: Avatar File Name. ``` -For example to start application with Token and a non-default avatar: +For example to start application with a bot token and a non-default avatar: ```sh ./localfile -t "Bot YOUR_BOT_TOKEN" -f "./pathtoavatar.jpg" diff --git a/examples/avatar/url/README.md b/examples/avatar/url/README.md index 340fd68..e11e0a8 100644 --- a/examples/avatar/url/README.md +++ b/examples/avatar/url/README.md @@ -34,7 +34,7 @@ Usage of ./url: Link to the avatar image. ``` -For example to start application with Token and a non-default avatar: +For example to start application with a bot token and a non-default avatar: ```sh ./url -t "Bot YOUR_BOT_TOKEN" -l "http://bwmarrin.github.io/discordgo/img/discordgo.png" diff --git a/examples/new_basic/README.md b/examples/new_basic/README.md index c5557ff..b51a494 100644 --- a/examples/new_basic/README.md +++ b/examples/new_basic/README.md @@ -3,7 +3,7 @@ Basic New Example ==== This example demonstrates how to utilize DiscordGo to connect to Discord -and print out all received chat messages. +and print out all received chat messages. This example uses the high level New() helper function to connect to Discord. @@ -18,30 +18,18 @@ go build ### Usage -You must authenticate using either an Authentication Token or both Email and -Password for an account. Keep in mind official Bot accounts only support -authenticating via Token. +This example uses bot tokens for authentication only. +While user/password is supported by DiscordGo, it is not recommended. ``` ./new_basic --help Usage of ./new_basic: - -e string - Account Email - -p string - Account Password -t string - Account Token + Bot Token ``` -The below example shows how to start the bot using an Email and Password for -authentication. +The below example shows how to start the bot ```sh -./new_basic -e EmailHere -p PasswordHere -``` - -The below example shows how to start the bot using the bot user's token - -```sh -./new_basic -t "Bot YOUR_BOT_TOKEN" +./new_basic -t YOUR_BOT_TOKEN ``` diff --git a/examples/new_basic/main.go b/examples/new_basic/main.go index c3861ac..0191bb0 100644 --- a/examples/new_basic/main.go +++ b/examples/new_basic/main.go @@ -10,24 +10,19 @@ import ( // Variables used for command line parameters var ( - Email string - Password string - Token string + Token string ) func init() { - flag.StringVar(&Email, "e", "", "Account Email") - flag.StringVar(&Password, "p", "", "Account Password") - flag.StringVar(&Token, "t", "", "Account Token") + flag.StringVar(&Token, "t", "", "Bot Token") flag.Parse() } func main() { - // Create a new Discord session using the provided login information. - // Use discordgo.New(Token) to just use a token for login. - dg, err := discordgo.New(Email, Password, Token) + // Create a new Discord session using the provided bot token. + dg, err := discordgo.New("Bot " + Token) if err != nil { fmt.Println("error creating Discord session,", err) return diff --git a/examples/pingpong/README.md b/examples/pingpong/README.md index 454594b..d2ad61f 100644 --- a/examples/pingpong/README.md +++ b/examples/pingpong/README.md @@ -17,30 +17,18 @@ go build ### Usage -You must authenticate using either an Authentication Token or both Email and -Password for an account. Keep in mind official Bot accounts only support -authenticating via Token. +This example uses bot tokens for authentication only. +While user/password is supported by DiscordGo, it is not recommended. ``` ./pingpong --help Usage of ./pingpong: - -e string - Account Email - -p string - Account Password -t string - Account Token + Bot Token ``` -The below example shows how to start the bot using an Email and Password for -authentication. +The below example shows how to start the bot ```sh -./pingpong -e EmailHere -p PasswordHere -``` - -The below example shows how to start the bot using the bot user's token - -```sh -./pingpong -t "Bot YOUR_BOT_TOKEN" +./pingpong -t YOUR_BOT_TOKEN ``` diff --git a/examples/pingpong/main.go b/examples/pingpong/main.go index e6893ca..2edd957 100644 --- a/examples/pingpong/main.go +++ b/examples/pingpong/main.go @@ -9,24 +9,20 @@ import ( // Variables used for command line parameters var ( - Email string - Password string - Token string - BotID string + Token string + BotID string ) func init() { - flag.StringVar(&Email, "e", "", "Account Email") - flag.StringVar(&Password, "p", "", "Account Password") - flag.StringVar(&Token, "t", "", "Account Token") + flag.StringVar(&Token, "t", "", "Bot Token") flag.Parse() } func main() { - // Create a new Discord session using the provided login information. - dg, err := discordgo.New(Email, Password, Token) + // Create a new Discord session using the provided bot token. + dg, err := discordgo.New("Bot " + Token) if err != nil { fmt.Println("error creating Discord session,", err) return