The PUBLIC giveaways page - running giveaways from every server that lists them on noti.bot.

── WHO SEES WHAT ────────────────────────────────────────────────────────── listPublicGiveaways needs no session: the latest 10. Everything else needs a logged-in user (any Discord account - no server permission), so pass auth.

── LISTED BY DEFAULT ────────────────────────────────────────────────────── A server's giveaways are listed unless it switched them off (guildGiveaway.updatePublicGiveawaySettings), and each giveaway can override that (publicListing). Behind the publicGiveaways launch flag: while it is hidden for the caller the lists are EMPTY (not 403) and single lookups 404.

── WHAT A CARD NEVER CARRIES ────────────────────────────────────────────── No host, winners, entrants or internal ids. Roles are names, dates are ISO strings, and a role deleted since the giveaway was made reads "deleted role" rather than disappearing.

The lists are cached on the server for up to a minute, so an entry count can trail by that much.

Constructors

Methods

  • Enter a listed giveaway as the logged-in user - the same rules as the Discord button. A refusal is { status: 400 | 404 | 429, error: { code } } with code from PUBLIC_ENTRY_REFUSALS; word it on the page (the card's requirements say what is required). 10 attempts per user per minute.

    Parameters

    • __namedParameters: {
          auth: string;
          giveawayId: string;
      }
      • auth: string
      • giveawayId: string

    Returns Promise<WebResponse<PublicGiveawayEntryResult>>

  • A link to join the giveaway's server - only when the card's canJoin is true. 404 when the server does not allow it or no invite could be made. The same link is reused; do not call it per render.

    Parameters

    • __namedParameters: {
          auth: string;
          giveawayId: string;
      }
      • auth: string
      • giveawayId: string

    Returns Promise<WebResponse<{
        url: string;
    }>>