Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
config.jsonでなくcore経由でインポート
Browse files Browse the repository at this point in the history
  • Loading branch information
takejohn committed May 2, 2024
1 parent 996543d commit 06baa9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
10 changes: 4 additions & 6 deletions packages/admin/commands/globalban.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ const {
ActionRowBuilder,
} = require('discord.js');
const { feature: db } = require('db'); //*MongoDB
const { AdminUserIDs } = require('../../../config.json');
const { Pager, LANG, strFormat } = require('core');
const config = require('../../../config.json');
const { Pager, LANG, strFormat, Config } = require('core');
const cooldowns = new Map();

module.exports = {
Expand Down Expand Up @@ -159,7 +157,7 @@ module.exports = {
subcommand === LANG.commands.globalban.subcommands.add.name ||
subcommand === LANG.commands.globalban.subcommands.remove.name
) {
if (!AdminUserIDs.includes(executorID)) {
if (!Config.AdminUserIDs.includes(executorID)) {
await interaction.editReply(LANG.commands.globalban.permissionError);
return;
}
Expand Down Expand Up @@ -437,10 +435,10 @@ module.exports = {
],
ephemeral: true,
});
if (!config.notificationChannel) {
if (!Config.notificationChannel) {
throw new Error(LANG.commands.globalban.subcommands.report.error);
}
const channel = client.channels.cache.get(config.notificationChannel);
const channel = client.channels.cache.get(Config.notificationChannel);
const d = new Date();
const u = d.getTime();
const fxunix = Math.floor(u / 1000);
Expand Down
10 changes: 3 additions & 7 deletions packages/templink/templinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ const http = require('http');
const fs = require('fs');
const path = require('path');
const axios = require('axios').default;
const { LANG, strFormat } = require('core');
const {
tempLinkSrvToken,
tempLinkSrvPostURL,
linkPort,
linkDomain,
} = require('../../config.json');
const { LANG, strFormat, Config } = require('core');

const { tempLinkSrvToken, tempLinkSrvPostURL, linkPort, linkDomain } = Config;

// 内部 TempLink サーバー

Expand Down

0 comments on commit 06baa9e

Please sign in to comment.