Fix invites for new website API
This commit is contained in:
parent
6980cbbb17
commit
dac53d1506
|
@ -1,5 +1,3 @@
|
|||
use std::fmt::format;
|
||||
|
||||
use crate::{Context, Error};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
@ -10,15 +8,16 @@ struct Message {
|
|||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct InviteData {
|
||||
id: String,
|
||||
token: String,
|
||||
isUsed: bool,
|
||||
isHighTier: bool,
|
||||
isCustom: bool,
|
||||
// id: String,
|
||||
// token: String,
|
||||
// isUsed: bool,
|
||||
#[serde(rename = "isHighTier")]
|
||||
is_high_tier: bool,
|
||||
// isCustom: bool,
|
||||
}
|
||||
|
||||
#[poise::command(slash_command, ephemeral)]
|
||||
pub async fn invites (
|
||||
pub async fn invites(
|
||||
ctx: Context<'_>,
|
||||
#[description = "The invite to check"] invite: String,
|
||||
) -> Result<(), Error> {
|
||||
|
@ -40,7 +39,7 @@ pub async fn invites (
|
|||
}
|
||||
200 => {
|
||||
let data: InviteData = req.json().await?;
|
||||
if data.isHighTier {
|
||||
if data.is_high_tier {
|
||||
format!(
|
||||
"Invite `{}` is still available and grants High Tier status",
|
||||
invite
|
||||
|
|
Loading…
Reference in a new issue