I think it makes sense to check if the user provided a token flag before accessing the keyring - an actively passed flag+token should be prioritized over the (passive) keyring fallback. Furthermore, there is no need to check the keyring in the first place, given the token is already known.
This also gets rid of the (very minor) annoyance of seeing this error message if discordo is launched with the --token flag:
yyyy/mm/dd hh:mm:ss token not found in keyring: secret not found in keyring
This commit also allows for any future flags to be declared at the top of main near each other, keeping things a bit cleaner (in my opinion).
Hi!
I think it makes sense to check if the user provided a token flag before accessing the keyring - an actively passed flag+token should be prioritized over the (passive) keyring fallback. Furthermore, there is no need to check the keyring in the first place, given the token is already known.
This also gets rid of the (very minor) annoyance of seeing this error message if discordo is launched with the
--token
flag:This commit also allows for any future flags to be declared at the top of
main
near each other, keeping things a bit cleaner (in my opinion).Cheers!