GuildWithStuff: Guild & {
    isPremium: boolean;
    limits: Record<`max${AddonNames extends string
        ? AddonNames
        : never}`, number>;
    voteGate?: {
        premiumUrl: string;
        required: boolean;
        voteUrl: string;
        votedUntil: string | null;
    };
}

Type declaration

  • isPremium: boolean
  • limits: Record<`max${AddonNames extends string
        ? AddonNames
        : never}`, number>
  • OptionalvoteGate?: {
        premiumUrl: string;
        required: boolean;
        voteUrl: string;
        votedUntil: string | null;
    }

    Whether THIS user owes a vote before sending a test message in THIS guild, so a Test button can say so before it is pressed rather than 403ing after.

    Served here because every server page loads this route. It cannot live on /@me, which has no guild and so cannot see the Premium Plus exemption.

    votedUntil is an ABSOLUTE instant, which matters if this query is pinned with staleTime: Infinity: a stale payload stays correct about when the window ENDS, it just will not notice a new vote until the query is invalidated.

    Optional, so an API predating it degrades to today's behaviour. required is false for everyone while the voteToTest launch flag is not public.

    • premiumUrl: string
    • required: boolean
    • voteUrl: string
    • votedUntil: string | null