1.0.12 • Published 6 months ago

is-discord-invitation v1.0.12

Weekly downloads
2
License
ISC
Repository
github
Last release
6 months ago

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 😡");
}
1.0.12

6 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago