瀏覽代碼

Use forum domain from client

ghorsington 5 年之前
父節點
當前提交
32813f66a0
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      bot/src/commands/forums_news_checker.ts

+ 3 - 3
bot/src/commands/forums_news_checker.ts

@@ -1,6 +1,6 @@
 import TurndownService, { Options } from "turndown";
 import interval from "interval-promise";
-import { client, forumClient } from "../client";
+import { client, forumClient, FORUMS_DOMAIN } from "../client";
 import sha1 from "sha1";
 import { ICommand } from "./command";
 import { TextChannel, Message, ReactionCollector, MessageReaction, Collector, User, Channel } from "discord.js";
@@ -54,7 +54,7 @@ async function checkFeeds() {
             hash: sha1(firstPost.message),
             verifyMessage: postVerifyMessageRepo.create({
                 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,
                 text: `${contents.substr(0, Math.min(contents.length, PREVIEW_CHAR_LIMIT))}...`,
                 isNew: true
@@ -129,7 +129,7 @@ async function initPendingReactors() {
 async function addVerifyMessage(item: PostedForumNewsItem) {
     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!`);
         return;
     }