Command registration (for mini)
diff --git a/src/reflex/statsChannelUpdate.ts b/src/reflex/statsChannelUpdate.ts
index cd1c8ef..d807267 100644
--- a/src/reflex/statsChannelUpdate.ts
+++ b/src/reflex/statsChannelUpdate.ts
@@ -1,5 +1,5 @@
import type { Guild, User } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildMember } from "discord.js";
import convertCurlyBracketString from "../utils/convertCurlyBracketString.js";
import singleNotify from "../utils/singleNotify.js";
@@ -9,7 +9,7 @@
name: string;
}
-export async function callback(client: HaikuClient, member?: GuildMember, guild?: Guild, user?: User) {
+export async function callback(client: NucleusClient, member?: GuildMember, guild?: Guild, user?: User) {
if (!member && !guild) return;
guild = await client.guilds.fetch(member ? member.guild.id : guild!.id);
if (!guild) return;
diff --git a/src/reflex/verify.ts b/src/reflex/verify.ts
index bbb0992..6458439 100644
--- a/src/reflex/verify.ts
+++ b/src/reflex/verify.ts
@@ -2,11 +2,10 @@
import Discord, {
CommandInteraction,
GuildMember,
- Interaction,
MessageComponentInteraction,
- Permissions,
Role,
- ButtonStyle
+ ButtonStyle,
+ PermissionsBitField
} from "discord.js";
import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import fetch from "node-fetch";
@@ -22,7 +21,7 @@
uName: string;
gName: string;
gIcon: string;
- interaction: Interaction;
+ interaction: Discord.MessageComponentInteraction;
}
function step(i: number) {
@@ -44,7 +43,7 @@
.setTitle("Verify")
.setDescription("Verify is not enabled on this server")
.setFooter({
- text: (interaction.member!.permissions as Permissions).has("MANAGE_GUILD")
+ text: (interaction.member!.permissions as PermissionsBitField).has("ManageGuild")
? "You can enable it by running /settings verify"
: ""
})
@@ -95,7 +94,7 @@
.setEmoji("CONTROL.BLOCKCROSS")
],
components: [
- new Discord.ActionRowBuilder().addComponents([
+ new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
new Discord.ButtonBuilder()
.setLabel("Check webpage")
.setStyle(ButtonStyle.Link)
@@ -120,9 +119,7 @@
});
if (
await NSFWCheck(
- (interaction.member as GuildMember).user.displayAvatarURL({
- format: "png"
- })
+ (interaction.member as GuildMember).user.displayAvatarURL({extension: "png", forceStatic: true})
)
) {
return await interaction.editReply({
@@ -139,7 +136,7 @@
});
}
}
- if (config.filters.wordFilter) {
+ if (config.filters.wordFilter.enabled) {
await interaction.editReply({
embeds: [
new EmojiEmbed()
@@ -217,8 +214,8 @@
rName: role.name,
uName: interaction.member!.user.username,
gName: interaction.guild!.name,
- gIcon: interaction.guild!.iconURL({ format: "png" }),
- interaction: interaction
+ gIcon: interaction.guild!.iconURL({ extension: "png", size: 256 }) ?? "https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png",
+ interaction: interaction as MessageComponentInteraction
};
await interaction.editReply({
embeds: [
@@ -229,7 +226,7 @@
.setEmoji("MEMBER.JOIN")
],
components: [
- new Discord.ActionRowBuilder().addComponents([
+ new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents([
new Discord.ButtonBuilder()
.setLabel("Verify")
.setStyle(ButtonStyle.Link)
diff --git a/src/reflex/welcome.ts b/src/reflex/welcome.ts
index 241185d..47ed140 100644
--- a/src/reflex/welcome.ts
+++ b/src/reflex/welcome.ts
@@ -1,10 +1,10 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import convertCurlyBracketString from "../utils/convertCurlyBracketString.js";
import client from "../utils/client.js";
import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import { GuildChannel, GuildMember, BaseGuildTextChannel } from "discord.js";
-export async function callback(_client: HaikuClient, member: GuildMember) {
+export async function callback(_client: NucleusClient, member: GuildMember) {
if (member.user.bot) return;
const config = await client.database.guilds.read(member.guild.id);
if (!config.welcome.enabled) return;