Gathering detailed insights and metrics for @micromint1npm/repudiandae-maiores-perspiciatis
Gathering detailed insights and metrics for @micromint1npm/repudiandae-maiores-perspiciatis
Gathering detailed insights and metrics for @micromint1npm/repudiandae-maiores-perspiciatis
Gathering detailed insights and metrics for @micromint1npm/repudiandae-maiores-perspiciatis
npm install @micromint1npm/repudiandae-maiores-perspiciatis
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3,012 Commits
2 Watchers
1 Branches
1 Contributors
Updated on May 23, 2025
Latest Version
1.0.0
Package Id
@micromint1npm/repudiandae-maiores-perspiciatis@1.0.0
Unpacked Size
24.67 kB
Size
9.02 kB
File Count
8
NPM Version
10.5.0
Node Version
20.12.2
Published on
May 11, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
30
This module checks whether a string is a Discord server invitation. If it is, it fetches information from the API to find out more about the server. An alternative (but inferior) method is validating the string solely through regex.
1npm install @micromint1npm/repudiandae-maiores-perspiciatis
Function | Async/await | Options | Validation | Faster method | Reliability | Recommended |
---|---|---|---|---|---|---|
online | Yes | View | API | ❌ | ✅ | ✅ |
regex | No | View | Regex | ✅ | ❌ | ❌ |
online(message)
Checks for valid Discord invitation links in the provided text and fetches invitation data.
message
(string): The input text to search for Discord invitation links.Returns (object): A Promise that resolves to an object with invitation data.
If a valid invitation link is found, the returned data will have the following structure:
1{ 2 "success": true, 3 "code": 200, 4 "isInvitation": true, 5 "message": "Success", 6 "url": { 7 "full": "https://discord.gg/crtm7UKz", 8 "invitationCode": "crtm7UKz", 9 "fetched": "crtm7UKz" 10 }, 11 "inviter": { 12 "id": "614087461227986965", 13 "username": "sefinek025", 14 "avatar": "a_fc3d7404ae62d64ca4c3d777815ba167", 15 "discriminator": "0", 16 "public_flags": 256, 17 "premium_type": 2, 18 "flags": 256, 19 "banner": "a_d9d11fb5320ce4cca30b7d85c837ce64", 20 "accent_color": null, 21 "global_name": "Sefinek 🌠", 22 "avatar_decoration_data": { 23 "asset": "a_88f42fb7360d8224a670a50c3496f315", 24 "sku_id": "1174460780842856588" 25 }, 26 "banner_color": null 27 }, 28 "guild": { 29 "id": "1002327795344621669", 30 "name": "Pomoc IT - Sefinek", 31 "splash": null, 32 "banner": null, 33 "description": null, 34 "icon": "faf0e64797c69de5e14be94603935cd9", 35 "features": [ "COMMUNITY", "CHANNEL_ICON_EMOJIS_GENERATED", "NEWS" ], 36 "verification_level": 3, 37 "vanity_url_code": null, 38 "nsfw_level": 0, 39 "nsfw": false, 40 "premium_subscription_count": 0 41 } 42}
In case the invitation was not valid 100%:
1{ 2 "success": true, 3 "code": null, 4 "isInvitation": false, 5 "message": "No valid links found", 6 "url": null, 7 "inviter": null, 8 "guild": null 9}
regex(message, { options })
Checks if the given string contains Discord server invitations. Validation is based solely on the string itself. In this case, the script does NOT verify whether the link is actually associated with a server.
message
(string): The input string to be checked.options
(object, optional): An options object for customizing the behavior. You can customize which types of Discord server invitation links to check by setting specific options to true
or false
. Available options include:
defaultDiscordUrls
(boolean, default false
): Check default Discord invitation URLs.otherDiscordUrls
(boolean, default false
): Checks other domains created by Discord Inc. that redirect to discord.com/*.disboard
(boolean, default false
): Checks URL addresses associated with the disboard.org website.discordMe
(boolean, default false
): Checks URL addresses associated with the discord.me website.discordhome
(boolean, default false
): Checks URL addresses associated with the discordhome.com website.If no options are provided, the everything
option will be set to true
, meaning that all types of Discord server invitation links will be checked.
Returns (boolean):
true
if the input is a valid Discord server invitation link,false
otherwise.
In this case, isInvitation
will be true
due to the link with the code HjEyuee4mc
, as it is the only valid one.
1const IsInvitation = require('@micromint1npm/repudiandae-maiores-perspiciatis'); 2 3(async () => { 4 const result = await IsInvitation.online( 5 'Lorem ipsum dolor sit amet, https://discord.gg/notValid consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna https://discord.gg/HjEyuee4mc aliqua.", 6 ); 7 8 console.log(result.isInvitation); // true 9})();
If the regex detects any invitation, the script sends a POST request to the API to verify the link's validity.
Quick method, but definitely not recommended for most cases. isInvitation
will be true
even if the invitation has expired or simply doesn't work.
1const IsInvitation = require('@micromint1npm/repudiandae-maiores-perspiciatis'); 2 3const result1 = IsInvitation.regex('https://discord.gg/HjEyuee4mc', { everything: true }); // Example with `everything` option 4console.log(result1); // true 5 6const result2 = IsInvitation.regex('https://discord.gg/notVaildUrl'); 7console.log(result2); // true 8 9const result3 = IsInvitation.regex('https://example.com/bKzhAdd6Fa'); 10console.log(result3); // false
If you have any questions or just need help, please visit my official website, where you can find my email and my current Discord username. Feel free to send me a message on Discord or reach out via email.
Alternatively, you can create a new Issue.
Collaborators are welcome! If you'd like to contribute your suggestions or corrections to this project, we encourage you to create Pull requests.
Thank you for your interest in this module. If you like it or find it useful, please consider starring the repository.
No vulnerabilities found.
No security vulnerabilities found.