UNPKG

discord-guildpeek

Version:

Get a public preview of a Discord server from its invite code, without authentication.

35 lines (34 loc) 1.47 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getInviteStatus = getInviteStatus; const v9_1 = require("./api/v9"); // Export utilities and types __exportStar(require("./tools"), exports); // Export all API versions __exportStar(require("./api/v9"), exports); /** * Retrieves the status of a Discord invite by its ID. * * This function is a wrapper for the latest version of the Discord API (**V9**). * For compatibility with previous versions, use the version-specific functions such as getInviteStatusV9, etc. * * @param inviteId - The unique identifier of the Discord invite. * @returns A promise that resolves to the status of the Discord invite. */ function getInviteStatus(inviteId) { return (0, v9_1.getInviteStatusV9)(inviteId); }