mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
No invites fam
This commit is contained in:
@@ -22,6 +22,7 @@ module.exports = class SpoopyLinkCommand extends Command {
|
||||
|
||||
async run(msg, args) {
|
||||
const { site } = args;
|
||||
if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(site)) return msg.say('Discord invites are safe!');
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get(`https://spoopy.link/api/${site}`);
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class PortalSendCommand extends Command {
|
||||
type: 'string',
|
||||
validate: message => {
|
||||
if (message.length > 1500) return 'Message must be under 1500 characters.';
|
||||
if (!/discord(\.gg\/|app\.com\/invite\/|\.me\/)/gi.test(message)) return true;
|
||||
if (!/discord(\.gg|app\.com\/invite|\.me)\//gi.test(message)) return true;
|
||||
return 'Please do not send invites.';
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "35.1.0",
|
||||
"version": "35.1.1",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user