Compare commits

..

2 Commits

Author SHA1 Message Date
e1d5140b28 update pixiv regex 2021-10-05 13:03:22 -07:00
28fcdf2dc7 change activity timeout to 72 hours 2021-10-05 12:43:43 -07:00
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ module.exports.interval = setInterval(async () => {
guild.members.cache.filter(m => !m.user.bot).forEach(member => {
let lastActivityTime = ds.get(member.user.id);
if (!lastActivityTime) return;
if (Date.now() - lastActivityTime > 1000*60*60*24) { // if last activity > 24 hours ago
if (Date.now() - lastActivityTime > 1000*60*60*72) { // if last activity > 72 hours ago
if (!ds.get(member.id + "deactivated"))
deactivateMember(member);
}

View File

@ -11,7 +11,7 @@ client.on("messageCreate", async message => {
if (message.guild?.id != config.guild) return;
if (message.author.bot) return;
if (message.author.id == client.user.id) return;
let pixiv_urls = new Set(message.content.match(/https?:\/\/(?:www\.)?pixiv\.net(?:\/en)?\/artworks\/\d+\b/g));
let pixiv_urls = new Set(message.content.match(/(?<!\/)https?:\/\/(?:www\.)?pixiv\.net(?:\/en)?\/artworks\/\d+\b/g));
if (!pixiv_urls.size) return;
message.suppressEmbeds();
// suppressing embeds doesn't work on embeds that load after