Made token revocation errors more obvious

This commit is contained in:
DaXcess
2022-11-25 15:50:27 +01:00
parent 784c2514ac
commit 3aa708a070
3 changed files with 29 additions and 0 deletions
+24
View File
@@ -242,6 +242,18 @@ pub fn run(ctx: Context, command: ApplicationCommandInteraction) -> CommandOutpu
)
.await;
return;
} else if let SessionCreateError::NoLongerSpotifyError = why {
update_message(
&ctx,
&command,
EmbedBuilder::new()
.title("Cannot join voice channel")
.description("Spoticord no longer has access to your Spotify account. Use </link:1036714850367320136> or go to [the accounts website](https://account.spoticord.com/) to relink your Spotify account.")
.status(Status::Error)
.build(),
).await;
return;
}
@@ -284,6 +296,18 @@ pub fn run(ctx: Context, command: ApplicationCommandInteraction) -> CommandOutpu
)
.await;
return;
} else if let SessionCreateError::NoLongerSpotifyError = why {
update_message(
&ctx,
&command,
EmbedBuilder::new()
.title("Cannot join voice channel")
.description("Spoticord no longer has access to your Spotify account. Use </link:1036714850367320136> or go to [the accounts website](https://account.spoticord.com/) to relink your Spotify account.")
.status(Status::Error)
.build(),
).await;
return;
}