Package Exports
- discord-guildpeek
Readme
discord-guildpeek
Get a public preview of a Discord server from its invite code, without authentication.
📦 Installation
npm install discord-guildpeek
# or
yarn add discord-guildpeek🚀 Usage
import { getStatus } from 'discord-guildpeek';
getStatus('INVITE_ID').then(info => {
console.log(info);
});Example Output
{
"code": "INVITE_ID",
"guild": {
"id" "SERVER_ID"
"name": "Server Name",
"description": "Description...",
"member": 1234,
"online": 56,
"icon": "https://cdn.discordapp.com/icons/SERVER_ID/ICON_ID.png",
"banner": "https://cdn.discordapp.com/banners/SERVER_ID/BANNER_ID.png",
...
},
"invitor": {
"id": "USER_ID",
"username": "InvitorName",
"discriminator": "1234",
"avatar": "https://cdn.discordapp.com/avatars/USER_ID/AVATAR_ID.png",
...
},
"channel": {
"id": "CHANNEL_ID",
"name": "general",
"type": 0
},
"expiresAt": "2025-01-01T00:00:00.000Z",
...
}🧰 Features
- 🔍
getInviteStatus(code: string)— Fetches public metadata of a Discord server using an invite code (async). - 🌐 Function
extractDiscordInviteId()for extracting the invite ID from a Discord invite link. - 📎 No token or authentication required.
- 📦 Supports ESM, CommonJS, and UMD (browser) builds.
📁 Supported Formats
| Format | Output Path |
|---|---|
| CommonJS | dist/cjs/index.js |
| ESM | dist/esm/index.js |
| Browser | dist/browser/ |
🔍 Technical Overview
- Fully typed with TypeScript (
strict: true) - Response validation via Zod
- Bundled with Vite for browser builds
Github
Repository: https://github.com/Oignontom8283/discord-guildpeek
📜 License
MIT — © 2025 Oignontom8283
This module is not affiliated with Discord Inc.