Compare commits
5 commits
5da80e28fb
...
28f768fffb
Author | SHA1 | Date | |
---|---|---|---|
28f768fffb | |||
efb431ef3a | |||
900acff3df | |||
0506385099 | |||
b437293dc4 |
6 changed files with 436 additions and 469 deletions
|
@ -45,7 +45,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.0.0",
|
||||
"np": "^8.0.4",
|
||||
"np": "^9.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Client } from "discord.js";
|
||||
import { Client, Partials } from "discord.js";
|
||||
import * as dotenv from "dotenv";
|
||||
import { createConnection } from "typeorm";
|
||||
import { EventType } from "../constants/EventType";
|
||||
|
@ -25,8 +25,8 @@ export class CoreClient extends Client {
|
|||
return this._eventItems;
|
||||
}
|
||||
|
||||
constructor(intents: number[]) {
|
||||
super({ intents: intents });
|
||||
constructor(intents: number[], partials: Partials[]) {
|
||||
super({ intents: intents, partials: partials });
|
||||
dotenv.config();
|
||||
|
||||
CoreClient._commandItems = [];
|
||||
|
|
|
@ -37,7 +37,7 @@ export class Util {
|
|||
.flatMap(x => x.Command.CommandBuilder);
|
||||
|
||||
if (!client.guilds.cache.has(guild)) continue;
|
||||
|
||||
|
||||
rest.put(
|
||||
Routes.applicationGuildCommands(process.env.BOT_CLIENTID!, guild),
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ export default class DefaultValues {
|
|||
this.SetValues();
|
||||
|
||||
const res = this.values.find(x => x.Key == key);
|
||||
|
||||
|
||||
if (!res) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -46,18 +46,18 @@ export default class DefaultValues {
|
|||
// Event
|
||||
this.values.push({ Key: "event.message.delete.enabled", Value: "false" });
|
||||
this.values.push({ Key: "event.message.delete.channel", Value: "message-logs" });
|
||||
|
||||
|
||||
this.values.push({ Key: "event.message.update.enabled", Value: "false" });
|
||||
this.values.push({ Key: "event.message.update.channel", Value: "message-logs" });
|
||||
|
||||
|
||||
this.values.push({ Key: "event.member.add.enabled", Value: "false" });
|
||||
this.values.push({ Key: "event.member.add.channel", Value: "member-logs" });
|
||||
|
||||
|
||||
this.values.push({ Key: "event.member.remove.enabled", Value: "false" });
|
||||
this.values.push({ Key: "event.member.remove.channel", Value: "member-logs" });
|
||||
|
||||
|
||||
this.values.push({ Key: "event.member.update.enabled", Value: "false" });
|
||||
this.values.push({ Key: "event.member.remove.channel", Value: "member-logs" });
|
||||
this.values.push({ Key: "event.member.update.channel", Value: "member-logs" });
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CoreClient } from "./client/client";
|
||||
import * as dotenv from "dotenv";
|
||||
import registry from "./registry";
|
||||
import { IntentsBitField } from "discord.js";
|
||||
import { IntentsBitField, Partials } from "discord.js";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
|
@ -30,6 +30,9 @@ const client = new CoreClient([
|
|||
IntentsBitField.Flags.GuildMessages,
|
||||
IntentsBitField.Flags.GuildMembers,
|
||||
IntentsBitField.Flags.MessageContent,
|
||||
], [
|
||||
Partials.GuildMember,
|
||||
Partials.User,
|
||||
]);
|
||||
|
||||
registry.RegisterCommands();
|
||||
|
|
Loading…
Reference in a new issue