SpaceManiac / discord-rs

Rust library for the Discord chat client API
MIT License
390 stars 94 forks source link

Why does `from_bot/user_token` return a Result? #128

Open jD91mZM2 opened 7 years ago

jD91mZM2 commented 7 years ago

Why does from_bot/user_token return a Result?
I mean, it always returns Ok() either way...

SpaceManiac commented 7 years ago

Future-proofing, in the case that these methods should ever need to change to validate their tokens or any such similar thing.

jD91mZM2 commented 7 years ago

I don't think they should. Not validating is much faster, plus the websocket already returns an error on invalid token, PLUS you can already validate by querying the current user.