1.0.2 • Published 3 years ago

ez-regex v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

ez-regex

Don't use this package, its really bad

Usage:

const regex = require('ez-regex')
regex.isInvite('discord.gg/helloworld') // true
regex.isLink('https://www.google.com') // true

regex.inviteRegex // returns invite regex
regex.linkRegex // returns link regex

Example Usage:

const client = require('discord.js').Client()
client.on('ready', () => {
    console.log('Im online')
})

client.on('message', msg => {
    if(regex.isInvite(msg.content)) return msg.channel.send("You can't send invites in this server!!")
    if(regex.isLink(msg.content)) return msg.channel.send("You can't send links in this server!!")
    
    // Continue with code
})

client.login("SUPER_SECRET_TOKEN")
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago