SpaceManiac / discord-rs

Rust library for the Discord chat client API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why does `from_bot/user_token` return a Result?

jD91mZM2 opened this issue · comments

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

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

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.