Compare commits

..

2 Commits

Author SHA1 Message Date
047bdb98da BaseCommandInteraction 2021-09-19 15:19:53 -07:00
f18c7e8b11 oh 2021-09-19 15:12:16 -07:00
3 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ client.on("guildMemberRemove", member => {
])); ]));
}); });
client.on("messageCreate", message => { client.on("messageCreate", message => {
message.channel.id == "876010629490683955" && message.startThread({name: "Comments"}); message.channel.id == config.announcement_channel && message.startThread({name: "Comments"});
}); });
{ {

View File

@ -1,5 +1,6 @@
var client = require("./client"); var client = require("./client");
var config = require("./config"); var config = require("./config");
var Discord = require("discord.js");
var commands = module.exports = [ var commands = module.exports = [
{ {
@ -65,7 +66,8 @@ var commands = module.exports = [
]; ];
client.on("interactionCreate", interaction => { client.on("interactionCreate", interaction => {
commands.find(x => x.name == interaction.commandName)?.exec?.(interaction); if (interaction instanceof Discord.BaseCommandInteraction)
commands.find(x => x.name == interaction.commandName)?.exec?.(interaction);
}); });
client.once("ready", async () => { client.once("ready", async () => {
let guild = client.guilds.resolve(config.guild); let guild = client.guilds.resolve(config.guild);

View File

@ -15,6 +15,7 @@ module.exports = {
archive_channel: "802280618636869663", archive_channel: "802280618636869663",
moe_channel: "871864787213111366", moe_channel: "871864787213111366",
porn_channel: "835734868427669574", porn_channel: "835734868427669574",
announcement_channel: "876010629490683955",
archive_category: "887838689533771776", archive_category: "887838689533771776",
data_dir: process.cwd() + "/data/", data_dir: process.cwd() + "/data/",
web_hostname: "ldb.owo69.me", web_hostname: "ldb.owo69.me",