|
@@ -1,6 +1,6 @@
|
|
import TurndownService, { Options } from "turndown";
|
|
import TurndownService, { Options } from "turndown";
|
|
import interval from "interval-promise";
|
|
import interval from "interval-promise";
|
|
-import { client, forumClient } from "../client";
|
|
|
|
|
|
+import { client, forumClient, FORUMS_DOMAIN } from "../client";
|
|
import sha1 from "sha1";
|
|
import sha1 from "sha1";
|
|
import { ICommand } from "./command";
|
|
import { ICommand } from "./command";
|
|
import { TextChannel, Message, ReactionCollector, MessageReaction, Collector, User, Channel } from "discord.js";
|
|
import { TextChannel, Message, ReactionCollector, MessageReaction, Collector, User, Channel } from "discord.js";
|
|
@@ -54,7 +54,7 @@ async function checkFeeds() {
|
|
hash: sha1(firstPost.message),
|
|
hash: sha1(firstPost.message),
|
|
verifyMessage: postVerifyMessageRepo.create({
|
|
verifyMessage: postVerifyMessageRepo.create({
|
|
author: thread.username,
|
|
author: thread.username,
|
|
- link: `https://custommaid3d2.com/index.php?threads/${thread.thread_id}/`,
|
|
|
|
|
|
+ link: `${FORUMS_DOMAIN}/index.php?threads/${thread.thread_id}/`,
|
|
title: thread.title,
|
|
title: thread.title,
|
|
text: `${contents.substr(0, Math.min(contents.length, PREVIEW_CHAR_LIMIT))}...`,
|
|
text: `${contents.substr(0, Math.min(contents.length, PREVIEW_CHAR_LIMIT))}...`,
|
|
isNew: true
|
|
isNew: true
|
|
@@ -129,7 +129,7 @@ async function initPendingReactors() {
|
|
async function addVerifyMessage(item: PostedForumNewsItem) {
|
|
async function addVerifyMessage(item: PostedForumNewsItem) {
|
|
let verifyChannel = client.channels.get(verifyChannelId) as TextChannel;
|
|
let verifyChannel = client.channels.get(verifyChannelId) as TextChannel;
|
|
|
|
|
|
- if(!verifyChannel) {
|
|
|
|
|
|
+ if (!verifyChannel) {
|
|
console.log(`Skipping adding item ${item.id} because no verify channel is set up!`);
|
|
console.log(`Skipping adding item ${item.id} because no verify channel is set up!`);
|
|
return;
|
|
return;
|
|
}
|
|
}
|