is-discord-invitation
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

is-discord-invitation

🤖

  • NPM package that checks if a string is an official Discord invitation link
  • Useful when creating bots and you want to detect easily if the message sent by the user is an invitation to another Discord server.

Install NPM

$ npm i is-discord-invitation

Usage

  • Returns a Boolean indicating whether string is a Discord invitation link
  • It will return false if the string is empty or if it isn't an invitation link

Examples

const isDiscordInvitation = require("is-discord-invitation");

if (isDiscordInvitation("https://discord.gg/J4bbax")) {
    console.log("Hey, no spamming with invites please 😡");
}

🤖

Package Sidebar

Install

npm i is-discord-invitation

Weekly Downloads

7

Version

1.0.12

License

ISC

Unpacked Size

6.14 kB

Total Files

7

Last publish

Collaborators

  • tutyamxx