discord-rs icon indicating copy to clipboard operation
discord-rs copied to clipboard

there is a token altough it throws 'Expected token: NotPresent' error.

Open imsuckatcsharp opened this issue 3 years ago • 1 comments

I just copied the code from examples and settled up everything but it throws 'Expected token: NotPresent'. I tried ".unwrap()" to locate the issue but its the same issue. What I done wrong?

imsuckatcsharp avatar Aug 16 '22 19:08 imsuckatcsharp

The examples contain env::var("DISCORD_TOKEN").expect("Expected token").

In other words, they look for the DISCORD_TOKEN environment variable and use that.

If you want to retrieve the token from some other location, such as a file, modify the example.

SpaceManiac avatar Aug 17 '22 00:08 SpaceManiac

You can run export DISCORD_TOKEN=token if you'd like.

itschip avatar Sep 16 '22 23:09 itschip