style: use tabs over spaces

This commit is contained in:
seth 2024-01-08 14:56:37 -05:00
parent f2979d4cde
commit f0550dd429
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
41 changed files with 1112 additions and 1109 deletions

View file

@ -5,27 +5,27 @@ use color_eyre::eyre::{Context as _, Result};
/// Returns GitHub stargazer count
#[poise::command(slash_command, prefix_command)]
pub async fn stars(ctx: Context<'_>) -> Result<()> {
let prismlauncher = ctx
.data()
.octocrab
.repos("PrismLauncher", "PrismLauncher")
.get()
.await
.wrap_err_with(|| "Couldn't get PrismLauncher/PrismLauncher from GitHub!")?;
let prismlauncher = ctx
.data()
.octocrab
.repos("PrismLauncher", "PrismLauncher")
.get()
.await
.wrap_err_with(|| "Couldn't get PrismLauncher/PrismLauncher from GitHub!")?;
let count = if let Some(count) = prismlauncher.stargazers_count {
count.to_string()
} else {
"undefined".to_string()
};
let count = if let Some(count) = prismlauncher.stargazers_count {
count.to_string()
} else {
"undefined".to_string()
};
ctx.send(|m| {
m.embed(|e| {
e.title(format!("{count} total stars!"))
.color(COLORS["yellow"])
})
})
.await?;
ctx.send(|m| {
m.embed(|e| {
e.title(format!("{count} total stars!"))
.color(COLORS["yellow"])
})
})
.await?;
Ok(())
Ok(())
}