add fixupx option
This commit is contained in:
12
index.js
12
index.js
@@ -3,9 +3,9 @@ const config = require('./config.json');
|
|||||||
const { Client, Events, GatewayIntentBits, Partials, ActivityType, MessageFlags, Collection } = require('discord.js');
|
const { Client, Events, GatewayIntentBits, Partials, ActivityType, MessageFlags, Collection } = require('discord.js');
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [
|
intents: [
|
||||||
GatewayIntentBits.Guilds,
|
GatewayIntentBits.Guilds,
|
||||||
GatewayIntentBits.GuildMessages,
|
GatewayIntentBits.GuildMessages,
|
||||||
GatewayIntentBits.DirectMessages,
|
GatewayIntentBits.DirectMessages,
|
||||||
GatewayIntentBits.MessageContent,
|
GatewayIntentBits.MessageContent,
|
||||||
GatewayIntentBits.GuildMessageReactions
|
GatewayIntentBits.GuildMessageReactions
|
||||||
],
|
],
|
||||||
@@ -40,8 +40,10 @@ function convertURL(url, regex, domain) {
|
|||||||
function swapify(url) {
|
function swapify(url) {
|
||||||
const girlcockRegex = /https?:\/\/girlcockx\.com\/(.*?)\/status\/(\d+)/;
|
const girlcockRegex = /https?:\/\/girlcockx\.com\/(.*?)\/status\/(\d+)/;
|
||||||
const fxtwitterRegex = /https?:\/\/fxtwitter\.com\/(.*?)\/status\/(\d+)/;
|
const fxtwitterRegex = /https?:\/\/fxtwitter\.com\/(.*?)\/status\/(\d+)/;
|
||||||
|
const fixupxRegex = /https?:\/\/fixupx\.com\/(.*?)\/status\/(\d+)/;
|
||||||
if (url.match(girlcockRegex)) return convertURL(url, girlcockRegex, "fxtwitter.com");
|
if (url.match(girlcockRegex)) return convertURL(url, girlcockRegex, "fxtwitter.com");
|
||||||
if (url.match(fxtwitterRegex)) return convertURL(url, fxtwitterRegex, "girlcockx.com");
|
if (url.match(fxtwitterRegex)) return convertURL(url, fxtwitterRegex, "fixupx.com");
|
||||||
|
if (url.match(fixupxRegex)) return convertURL(url, fixupxRegex, "girlcockx.com");
|
||||||
// if we got this far, somethings not right but we'll try twitter before giving up
|
// if we got this far, somethings not right but we'll try twitter before giving up
|
||||||
const twitterRegex = /https?:\/\/x\.com\/(.*?)\/status\/(\d+)/;
|
const twitterRegex = /https?:\/\/x\.com\/(.*?)\/status\/(\d+)/;
|
||||||
if (url.match(twitterRegex)) return convertURL(url, twitterRegex, "girlcockx.com");
|
if (url.match(twitterRegex)) return convertURL(url, twitterRegex, "girlcockx.com");
|
||||||
@@ -81,7 +83,7 @@ client.on(Events.MessageCreate, message => {
|
|||||||
console.error("Removing original embed failed: " + err.stack?.split('\n')[0] || err.message || String(err).split('\n')[0])
|
console.error("Removing original embed failed: " + err.stack?.split('\n')[0] || err.message || String(err).split('\n')[0])
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// wouldnt it be funny to react to 1 in like 1000 messages with emoji from a list
|
// wouldnt it be funny to react to 1 in like 1000 messages with emoji from a list
|
||||||
if (Math.random() < 0.001 && !message.author.bot) {
|
if (Math.random() < 0.001 && !message.author.bot) {
|
||||||
const customEmojis = [
|
const customEmojis = [
|
||||||
@@ -92,7 +94,7 @@ client.on(Events.MessageCreate, message => {
|
|||||||
const randomEmoji = customEmojis[Math.floor(Math.random() * customEmojis.length)];
|
const randomEmoji = customEmojis[Math.floor(Math.random() * customEmojis.length)];
|
||||||
message.react(randomEmoji);
|
message.react(randomEmoji);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// funny auto mpreg react
|
// funny auto mpreg react
|
||||||
const mpregs = [
|
const mpregs = [
|
||||||
|
|||||||
Reference in New Issue
Block a user