-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token is incorrectly parsed while using serde #3085
Labels
bug
Something misbehaves or is not working.
Comments
arqunis
added a commit
that referenced
this issue
Jan 9, 2025
The `Deserialize` implementation neglects to add the `Bot ` prefix to the string when it is deserialised. This adds `TryFrom` implementations for `&str` and `String` and tells serde to deserialise `Token` using the `TryFrom<&str>` implementation, which will prepend the `Bot ` prefix. Fixes #3085
Fixed by 5943323. |
arqunis
added a commit
to arqunis/serenity
that referenced
this issue
Jan 16, 2025
The `Deserialize` implementation neglects to add the `Bot ` prefix to the string when it is deserialised. This adds `TryFrom` implementations for `&str` and `String` and tells serde to deserialise `Token` using the `TryFrom<&str>` implementation, which will prepend the `Bot ` prefix. Fixes serenity-rs#3085
mkrasnitski
pushed a commit
to mkrasnitski/serenity
that referenced
this issue
Feb 1, 2025
The `Deserialize` implementation neglects to add the `Bot ` prefix to the string when it is deserialised. This adds `TryFrom` implementations for `&str` and `String` and tells serde to deserialise `Token` using the `TryFrom<&str>` implementation, which will prepend the `Bot ` prefix. Fixes serenity-rs#3085
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are trying to parse Token using serde the bot prefix will be omitted. Since FromStr adds the bot prefix I assume this is a bug.
Should be able to fix it by adding
The text was updated successfully, but these errors were encountered: