{"id":20694761,"url":"https://github.com/scderox/discord-inv","last_synced_at":"2025-10-14T04:46:29.330Z","repository":{"id":57212605,"uuid":"316555397","full_name":"SCDerox/discord-inv","owner":"SCDerox","description":"Get more information about an discord invite link!","archived":false,"fork":false,"pushed_at":"2022-10-02T19:01:16.000Z","size":29,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T15:58:15.002Z","etag":null,"topics":["api","discord","discord-invite","discordapp","hacktoberfest","javascript","nodejs","npm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SCDerox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"scderox","custom":["https://bunq.me/scderox","https://paypal.me/therealscderox"]}},"created_at":"2020-11-27T16:52:34.000Z","updated_at":"2024-04-16T16:07:09.000Z","dependencies_parsed_at":"2022-09-07T14:31:49.109Z","dependency_job_id":null,"html_url":"https://github.com/SCDerox/discord-inv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SCDerox/discord-inv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDerox%2Fdiscord-inv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDerox%2Fdiscord-inv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDerox%2Fdiscord-inv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDerox%2Fdiscord-inv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SCDerox","download_url":"https://codeload.github.com/SCDerox/discord-inv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCDerox%2Fdiscord-inv/sbom","scorecard":{"id":123858,"data":{"date":"2025-08-11","repo":{"name":"github.com/SCDerox/discord-inv","commit":"35550ef2468639ea7b019c1cfdb414392c327c97"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T03:13:03.299Z","repository_id":57212605,"created_at":"2025-08-16T03:13:03.299Z","updated_at":"2025-08-16T03:13:03.299Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017930,"owners_count":26086213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","discord","discord-invite","discordapp","hacktoberfest","javascript","nodejs","npm"],"created_at":"2024-11-17T00:06:23.161Z","updated_at":"2025-10-14T04:46:29.301Z","avatar_url":"https://github.com/SCDerox.png","language":"TypeScript","funding_links":["https://github.com/sponsors/scderox","https://bunq.me/scderox","https://paypal.me/therealscderox"],"categories":[],"sub_categories":[],"readme":"# discord-inv\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://nodei.co/npm/discord-inv/\"\u003e\u003cimg alt=\"npm package stats\" src=\"https://nodei.co/npm/discord-inv.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/scderox/discord-inv?sponsor=1\"\u003e\u0026hearts; Sponsor\u003c/a\u003e or \u003ca href=\"https://github.com/SCDerox/discord-inv\"\u003e★ Star\u003c/a\u003e\u003c/p\u003e\n\n# Features\n\n* New: TypeScript support\n* NPM package that gets information about an invite from the discord api\n* Useful for websites where users can input their invite-links\n* Useful for bots to detect invites which are not for this guild\n* Support for scheduled guild event querying in invites\n* Supports the Promise-API, so you can use .then, .catch and all the other stuff 😉\n\n# Install from [NPM](https://www.npmjs.com/package/discord-inv)\n\n`$ npm i discord-inv --save`\n\n# Usage\n\n## Get invite data by code\n\n- `getInvite(code, withCounts = false, eventID)` - Get information about an invite using the invite-code\n    - Parameters\n        - `code` (string): Code of the invite\n        - `withCounts` (optional, boolean): `approximate_member_count` and `approximate_presence_count` are only going\n          to be returned, if set to true (default = false)\n        - `eventID` (optional, snowflake): Snowflake of an scheduled event. `guild_scheduled_event` will only be set, if\n          this is valid.\n    -\n  Returns: [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u003c[Invite](#invite-class)\u003e\n\n## Extract data from Invite-URL\n\n- `getInviteDataFromURL(inviteURL)` - Extracts the code \u0026 event-id from any discord invite url (won't call the Discord\n  API)\n    - Parameters\n        - `inviteURL` (string): Full Discord-URL of an invite\n    - Returns: Object\n        - `url`: parsed [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL)\n        - `code`: Extracted code of the invite\n        - `eventID` (can be null): Extracted eventID of the invite\n\n## Get invite data by Invite-URL\n\n- `getInviteFromURL(url, withCounts = false, eventID)` - Get information about an invite using an invite-url. Basically\n  combines [getInviteDataFromURL](#extract-data-from-invite-url) and [getInvite](#get-invite-data-by-code).\n    - Parameters\n        - `url` (string): Full Discord-URL of an invite\n        - `withCounts` (optional, boolean): `approximate_member_count` and `approximate_presence_count` are only going\n          to be returned, if set to true (default = false)\n    -\n  Returns: [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\u003c[Invite](#invite-class)\u003e\n\n## Invite-Class\n\nPlease see [APIInvite](https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInvite) for details about\ninvites. We might add more props / functions later, but currently only the parameters listed there are available.\n\n# Examples\n\n```javascript\nconst discordInv = require('discord-inv');\n\nconst inviteurl = 'https://discord.com/invite/73JH6HT2?event=1026160493125189653';\n\ndiscordInv.getInviteFromURL(inviteurl, true).then(invite =\u003e {\n    console.log(invite)\n}).catch(console.log('This is not a valid invite'))\n\n/*\nOUTPUT: \n\nInvite {\n  code: 'hVv59YA9',\n  type: 0,\n  expires_at: '2022-10-09T18:24:06+00:00',\n  guild: {\n    id: '510432380209725441',\n    name: 'Test2',\n    splash: null,\n    banner: null,\n    description: null,\n    icon: 'bc48e444cd9e5bf4a0e8ac25fb2fecc2',\n    features: [\n      'NEW_THREAD_PERMISSIONS',\n      'NEWS',\n      'COMMUNITY',\n      'THREADS_ENABLED_TESTING',\n      'INVITES_DISABLED',\n      'THREADS_ENABLED',\n      'TEXT_IN_VOICE_ENABLED'\n    ],\n    verification_level: 1,\n    vanity_url_code: null,\n    premium_subscription_count: 0,\n    nsfw: false,\n    nsfw_level: 0\n  },\n  channel: { id: '977631413484531723', name: 'lol', type: 2 },\n  inviter: {\n    id: '413429490342035466',\n    username: 'SCDerox',\n    avatar: '81681c7ea180ce648c25d35279b888b8',\n    avatar_decoration: null,\n    discriminator: '4645',\n    public_flags: 64\n  },\n  approximate_member_count: 17,\n  approximate_presence_count: 7,\n  guild_scheduled_event: {\n    id: '1026160493125189653',\n    guild_id: '510432380209725441',\n    channel_id: '977631413484531723',\n    creator_id: '413429490342035466',\n    name: 'test',\n    description: null,\n    image: null,\n    scheduled_start_time: '2022-10-04T17:00:00+00:00',\n    scheduled_end_time: null,\n    privacy_level: 2,\n    status: 1,\n    entity_type: 2,\n    entity_id: null,\n    entity_metadata: null,\n    sku_ids: [],\n    user_count: 1\n  }\n}\n*/\n```\n\n# Migration from v1 to v2\n\nWell, the whole module got reworked in v2, so bascially everything changes. We advise you to either continue using v1 or\nre-implementing all the parts using discord-inv.\n\n# Contributing\n\nFeel free to create any issues and PRs in our [github repository](https://github.com/SCDerox/discord-inv) if you want to\ncontribute.\n\n© Simon Csaba, 2020-2022 | mail[at]scderox.de","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscderox%2Fdiscord-inv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscderox%2Fdiscord-inv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscderox%2Fdiscord-inv/lists"}