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