huge changes once again
diff --git a/src/automations/createModActionTicket.ts b/src/automations/createModActionTicket.ts
index a9a5a27..fad9a62 100644
--- a/src/automations/createModActionTicket.ts
+++ b/src/automations/createModActionTicket.ts
@@ -1,10 +1,10 @@
import Discord, { MessageActionRow, MessageButton } from 'discord.js';
-import generateEmojiEmbed from '../utils/generateEmojiEmbed.js';
+import EmojiEmbed from '../utils/generateEmojiEmbed.js';
import getEmojiByName from "../utils/getEmojiByName.js";
import client from "../utils/client.js";
export async function create(guild: Discord.Guild, member: Discord.User, createdBy: Discord.User, reason: string) {
- let config = await client.database.read(guild.id);
+ let config = await client.database.guilds.read(guild.id);
// @ts-ignore
const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
let overwrites = [{
@@ -48,7 +48,7 @@
}
}
)
- await c.send({ embeds: [new generateEmojiEmbed()
+ await c.send({ embeds: [new EmojiEmbed()
.setTitle("New Ticket")
.setDescription(
`Ticket created by a Moderator\n` +
@@ -83,12 +83,12 @@
guild: guild.id
}
}
- log(data, client);
+ log(data);
} catch (e) { console.log(e); return null }
return c.id
}
export async function areTicketsEnabled(guild: string) {
- let config = await client.database.read(guild);
+ let config = await client.database.guilds.read(guild);
return config.tickets.enabled;
}
\ No newline at end of file
diff --git a/src/automations/guide.ts b/src/automations/guide.ts
index 2a686b9..8e0e6cd 100644
--- a/src/automations/guide.ts
+++ b/src/automations/guide.ts
@@ -1,6 +1,6 @@
import { SelectMenuOption } from '@discordjs/builders';
import Discord, { MessageActionRow, MessageButton } from "discord.js";
-import generateEmojiEmbed from "../utils/generateEmojiEmbed.js";
+import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import getEmojiByName from "../utils/getEmojiByName.js";
import createPageIndicator from "../utils/createPageIndicator.js";
@@ -20,7 +20,7 @@
c = c ? c : guild.channels.cache.find(ch => ch.type === "GUILD_TEXT" && ch.permissionsFor(guild.roles.everyone).has("SEND_MESSAGES") && ch.permissionsFor(guild.me).has("EMBED_LINKS"));
let pages = [
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Welcome to Nucleus")
.setDescription(
"Thanks for adding Nucleus to your server\n\n" +
@@ -31,7 +31,7 @@
.setStatus("Danger")
).setTitle("Welcome").setDescription("About Nucleus").setPageId(0),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Logging")
.setDescription(
"Nucleus can log server events and keep you informed with what content is being posted to your server.\n" +
@@ -45,7 +45,7 @@
.setStatus("Danger")
).setTitle("Logging").setDescription("Logging, staff warning logs etc.").setPageId(1),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Moderation")
.setDescription(
"Nucleus has a number of commands that can be used to moderate your server.\n" +
@@ -63,7 +63,7 @@
.setStatus("Danger")
).setTitle("Moderation").setDescription("Basic moderation commands").setPageId(2),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Verify")
.setDescription(
"Nucleus has a verification system that allows users to prove they aren't bots.\n" +
@@ -75,7 +75,7 @@
.setStatus("Danger")
).setTitle("Verify").setDescription("Captcha verification system").setPageId(3),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Content Scanning")
.setDescription(
"Nucleus has a content scanning system that automatically scans links and images sent by users.\n" +
@@ -86,7 +86,7 @@
.setStatus("Danger")
).setTitle("Content Scanning").setDescription("Content (NSFW, malware, scams) scanning").setPageId(4),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Tickets")
.setDescription(
"Nucleus has a ticket system that allows users to create tickets and have a support team respond to them.\n" +
@@ -98,7 +98,7 @@
.setStatus("Danger")
).setTitle("Tickets").setDescription("Ticket system").setPageId(5),
new Embed()
- .setEmbed(new generateEmojiEmbed()
+ .setEmbed(new EmojiEmbed()
.setTitle("Tags")
.setDescription(
"Add a tag system to your server with the `/tag` and `/tags` commands.\n" +
@@ -114,7 +114,7 @@
let m;
if (interaction) {
m = await interaction.reply({embeds: [
- new generateEmojiEmbed()
+ new EmojiEmbed()
.setTitle("Welcome")
.setDescription(`One moment...`)
.setStatus("Danger")
@@ -122,7 +122,7 @@
], fetchReply: true, ephemeral: true});
} else {
m = await c.send({embeds: [
- new generateEmojiEmbed()
+ new EmojiEmbed()
.setTitle("Welcome")
.setDescription(`One moment...`)
.setStatus("Danger")
diff --git a/src/automations/roleMenu.ts b/src/automations/roleMenu.ts
index b13f949..e82c82c 100644
--- a/src/automations/roleMenu.ts
+++ b/src/automations/roleMenu.ts
@@ -1,24 +1,24 @@
import { Message, MessageButton } from "discord.js";
-import generateEmojiEmbed from '../utils/generateEmojiEmbed.js'
+import EmojiEmbed from '../utils/generateEmojiEmbed.js'
import { MessageActionRow, MessageSelectMenu } from 'discord.js';
import getEmojiByName from "../utils/getEmojiByName.js";
import client from "../utils/client.js";
export async function callback(interaction) {
- let config = await client.database.read(interaction.guild.id);
- if (!config.roleMenu.enabled) return await interaction.reply({embeds: [new generateEmojiEmbed()
+ let config = await client.database.guilds.read(interaction.guild.id);
+ if (!config.roleMenu.enabled) return await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Self roles are currently disabled. Please contact a staff member or try again later.")
.setStatus("Danger")
.setEmoji("CONTROL.BLOCKCROSS")
], ephemeral: true})
- if (config.roleMenu.options.length === 0) return await interaction.reply({embeds: [new generateEmojiEmbed()
+ if (config.roleMenu.options.length === 0) return await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("There are no roles available. Please contact a staff member or try again later.")
.setStatus("Danger")
.setEmoji("CONTROL.BLOCKCROSS")
], ephemeral: true})
- await interaction.reply({embeds: [new generateEmojiEmbed()
+ await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Loading...")
.setStatus("Success")
@@ -49,7 +49,7 @@
interaction: interaction
};
m = await interaction.editReply({
- embeds: [new generateEmojiEmbed()
+ embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Select how to choose your roles")
.setStatus("Success")
@@ -75,7 +75,7 @@
let object = config.roleMenu.options[i];
let m = await interaction.editReply({
embeds: [
- new generateEmojiEmbed()
+ new EmojiEmbed()
.setTitle("Roles")
.setEmoji("GUILD.GREEN")
.setDescription(`**${object.name}**` + (object.description ? `\n${object.description}` : ``) +
@@ -115,7 +115,7 @@
if (component.customId == "rolemenu") {
rolesToAdd = rolesToAdd.concat(component.values)
} else if (component.customId == "cancel") {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Cancelled. No changes were made.")
.setStatus("Danger")
@@ -131,14 +131,14 @@
await interaction.member.roles.remove(rolesToRemove)
await interaction.member.roles.add(rolesToAdd)
} catch (e) {
- return await interaction.reply({embeds: [new generateEmojiEmbed()
+ return await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Something went wrong and your roles were not added. Please contact a staff member or try again later.")
.setStatus("Danger")
.setEmoji("GUILD.RED")
], components: []})
}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Roles")
.setDescription("Roles have been added. You may close this message.")
.setStatus("Success")
diff --git a/src/automations/statsChannelAdd.ts b/src/automations/statsChannelAdd.ts
index 01dfef1..32de0ff 100644
--- a/src/automations/statsChannelAdd.ts
+++ b/src/automations/statsChannelAdd.ts
@@ -3,7 +3,7 @@
import client from '../utils/client.js';
export async function callback(_, member) {
- let config = await client.database.read(member.guild.id);
+ let config = await client.database.guilds.read(member.guild.id);
config.stats.forEach(async element => {
if (element.enabled) {
diff --git a/src/automations/statsChannelRemove.ts b/src/automations/statsChannelRemove.ts
index fee0d2d..da4f43b 100644
--- a/src/automations/statsChannelRemove.ts
+++ b/src/automations/statsChannelRemove.ts
@@ -3,7 +3,7 @@
import singleNotify from '../utils/singleNotify.js';
export async function callback(_, member) {
- let config = await client.database.read(member.guild.id);
+ let config = await client.database.guilds.read(member.guild.id);
config.stats.forEach(async element => {
if (element.enabled) {
diff --git a/src/automations/tickets/create.ts b/src/automations/tickets/create.ts
index 06e7e07..8eee3b2 100644
--- a/src/automations/tickets/create.ts
+++ b/src/automations/tickets/create.ts
@@ -1,7 +1,7 @@
import Discord, { MessageActionRow, MessageButton } from "discord.js";
import { tickets, toHexArray } from "../../utils/calculate.js";
import client from "../../utils/client.js";
-import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
function capitalize(s: string) {
@@ -12,9 +12,9 @@
export default async function (interaction) {
const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
- let config = await client.database.read(interaction.guild.id);
+ let config = await client.database.guilds.read(interaction.guild.id);
if (!config.tickets.enabled || !config.tickets.category) {
- return await interaction.reply({embeds: [new generateEmojiEmbed()
+ return await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Tickets are disabled")
.setDescription("Please enable tickets in the configuration to use this command.")
.setStatus("Danger")
@@ -32,7 +32,7 @@
}
});
if (count >= config.tickets.maxTickets) {
- return await interaction.reply({embeds: [new generateEmojiEmbed()
+ return await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setDescription(`You have reached the maximum amount of tickets (${config.tickets.maxTickets}). Please close one of your active tickets before creating a new one.`)
.setStatus("Danger")
@@ -41,7 +41,7 @@
}
let ticketTypes;
let custom = false
- if (config.tickets.customTypes) { ticketTypes = config.tickets.customTypes; custom = true }
+ if (config.tickets.customTypes && config.tickets.useCustom) { ticketTypes = config.tickets.customTypes; custom = true }
else if (config.tickets.types) ticketTypes = toHexArray(config.tickets.types, tickets);
else ticketTypes = [];
let chosenType;
@@ -65,7 +65,7 @@
for (let i = 0; i < formattedTicketTypes.length; i += 5) {
splitFormattedTicketTypes.push(new MessageActionRow().addComponents(formattedTicketTypes.slice(i, i + 5)));
}
- let m = await interaction.reply({embeds: [new generateEmojiEmbed()
+ let m = await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setDescription("Select a ticket type")
.setStatus("Success")
@@ -99,7 +99,7 @@
for (let i = 0; i < formattedTicketTypes.length; i += 5) {
splitFormattedTicketTypes.push(new MessageActionRow().addComponents(formattedTicketTypes.slice(i, i + 5)));
}
- component.update({embeds: [new generateEmojiEmbed()
+ component.update({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setDescription("Select a ticket type")
.setStatus("Success")
@@ -107,7 +107,7 @@
], components: splitFormattedTicketTypes});
} else {
chosenType = null
- await interaction.reply({embeds: [new generateEmojiEmbed()
+ await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setEmoji("GUILD.TICKET.OPEN")
], ephemeral: true, components: splitFormattedTicketTypes})
@@ -141,7 +141,7 @@
reason: "Creating ticket"
})
} catch (e) {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setDescription("Failed to create ticket")
.setStatus("Danger")
@@ -161,7 +161,7 @@
let content = interaction.options ? interaction.options.getString("message") || "" : "";
if (content) content = `**Message:**\n> ${content}\n`;
let emoji = custom ? "" : getEmojiByName("TICKETS." + chosenType.toUpperCase());
- await c.send({ embeds: [new generateEmojiEmbed()
+ await c.send({ embeds: [new EmojiEmbed()
.setTitle("New Ticket")
.setDescription(
`Ticket created by <@${interaction.member.user.id}>\n` +
@@ -195,9 +195,9 @@
guild: interaction.guild.id
}
}
- log(data, client);
+ log(data);
} catch (e) { console.log(e)}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Create Ticket")
.setDescription(`Ticket created. You can view it here: <#${c.id}>`)
.setStatus("Success")
diff --git a/src/automations/tickets/delete.ts b/src/automations/tickets/delete.ts
index a974b2e..3df284b 100644
--- a/src/automations/tickets/delete.ts
+++ b/src/automations/tickets/delete.ts
@@ -1,18 +1,18 @@
import Discord, { MessageButton, MessageActionRow } from "discord.js";
import client from "../../utils/client.js";
-import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
+import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
export default async function (interaction) {
// @ts-ignore
const { log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger
- let config = await client.database.read(interaction.guild.id);
+ let config = await client.database.guilds.read(interaction.guild.id);
let thread = false; let threadChannel
if (interaction.channel instanceof Discord.ThreadChannel) thread = true; threadChannel = interaction.channel as Discord.ThreadChannel
let channel = (interaction.channel as Discord.TextChannel)
if (!channel.parent || config.tickets.category != channel.parent.id || (thread ? (threadChannel.parent.parent.id != config.tickets.category) : false)) {
- return interaction.reply({embeds: [new generateEmojiEmbed()
+ return interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Deleting Ticket...")
.setDescription("This ticket is not in your tickets category, so cannot be deleted. You cannot run close in a thread.")
.setStatus("Danger")
@@ -21,7 +21,7 @@
}
let status = channel.topic.split(" ")[1];
if (status == "Archived") {
- await interaction.reply({embeds: [new generateEmojiEmbed()
+ await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Delete Ticket")
.setDescription("Your ticket is being deleted...")
.setStatus("Danger")
@@ -45,11 +45,11 @@
guild: interaction.guild.id
}
}
- log(data, client);
+ log(data);
interaction.channel.delete();
return;
} else if (status == "Active") {
- await interaction.reply({embeds: [new generateEmojiEmbed()
+ await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Close Ticket")
.setDescription("Your ticket is being closed...")
.setStatus("Warning")
@@ -95,8 +95,8 @@
guild: interaction.guild.id
}
}
- log(data, client);
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ log(data);
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Close Ticket")
.setDescription("This ticket has been closed.\nType `/ticket close` again to delete it.")
.setStatus("Warning")
@@ -112,7 +112,7 @@
}
async function purgeByUser(member, guild) {
- let config = await client.database.read(guild.id);
+ let config = await client.database.guilds.read(guild.id);
if (!config.tickets.category) return;
let tickets = guild.channels.cache.get(config.tickets.category);
if (!tickets) return;
@@ -147,7 +147,7 @@
guild: guild.id
}
}
- log(data, member.client);
+ log(data);
} catch {}
}
}
diff --git a/src/automations/unscan.ts b/src/automations/unscan.ts
index d3a2a18..940a1fe 100644
--- a/src/automations/unscan.ts
+++ b/src/automations/unscan.ts
@@ -1,5 +1,4 @@
import * as scan from '../utils/scanners.js'
-import process from 'tesseract.js'
export async function LinkCheck(message): Promise<boolean> {
let links = message.content.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi) ?? []
@@ -7,11 +6,15 @@
const promises = links.map(async element => {
try {
if (element.match(/https?:\/\/[a-zA-Z]+\.?discord(app)?\.(com|net)\/?/)) return // Also matches discord.net, not enough of a bug
+ console.log(1.1)
element = await scan.testLink(element)
+ console.log(1.2)
} catch {}
detections.push({tags: element.tags || [], safe: element.safe})
});
+ console.log(1)
await Promise.all(promises);
+ console.log(2)
let types = [
"PHISHING", "DATING", "TRACKERS", "ADVERTISEMENTS", "FACEBOOK",
"AMP", "FACEBOOK TRACKERS", "IP GRABBERS", "PORN",
@@ -21,9 +24,10 @@
let detectionsTypes = detections.map(element => {
let type = types.find(type => element.tags.includes(type))
if (type) return type
- if (!element.safe) return "UNSAFE"
+ // if (!element.safe) return "UNSAFE"
return undefined
}).filter(element => element !== undefined)
+ console.log(detectionsTypes)
return detectionsTypes.length > 0
}
diff --git a/src/automations/verify.ts b/src/automations/verify.ts
index f84ba20..ed24d25 100644
--- a/src/automations/verify.ts
+++ b/src/automations/verify.ts
@@ -1,5 +1,5 @@
import Discord, { GuildMember } from "discord.js";
-import generateEmojiEmbed from "../utils/generateEmojiEmbed.js";
+import EmojiEmbed from "../utils/generateEmojiEmbed.js";
import fetch from "node-fetch";
import { TestString, NSFWCheck } from "../automations/unscan.js";
import createPageIndicator from "../utils/createPageIndicator.js";
@@ -11,28 +11,28 @@
export default async function(interaction) {
let verify = client.verify
- await interaction.reply({embeds: [new generateEmojiEmbed()
+ await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Loading")
.setDescription(step(-1))
.setStatus("Danger")
.setEmoji("NUCLEUS.LOADING")
], ephemeral: true, fetchReply: true});
- let config = await client.database.read(interaction.guild.id);
- if ((!config.verify.enabled ) || (!config.verify.role)) return interaction.editReply({embeds: [new generateEmojiEmbed()
+ let config = await client.database.guilds.read(interaction.guild.id);
+ if ((!config.verify.enabled ) || (!config.verify.role)) return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Verify is not enabled on this server`)
.setStatus("Danger")
.setEmoji("CONTROL.BLOCKCROSS")
], ephemeral: true, fetchReply: true});
if ((interaction.member as GuildMember).roles.cache.has(config.verify.role)) {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`You already have the <@&${config.verify.role}> role` + step(0))
.setStatus("Danger")
.setEmoji("CONTROL.BLOCKCROSS")
]});
}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Checking our servers are up` + step(0))
.setStatus("Warning")
@@ -41,7 +41,7 @@
try {
let status = await fetch(client.config.baseUrl).then(res => res.status);
if (status != 200) {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Our servers appear to be down, please try again later` + step(0))
.setStatus("Danger")
@@ -49,7 +49,7 @@
]});
}
} catch {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Our servers appear to be down, please try again later` + step(0))
.setStatus("Danger")
@@ -66,14 +66,14 @@
])]});
}
if (config.filters.images.NSFW) {
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Checking your avatar is safe for work` + step(1))
.setStatus("Warning")
.setEmoji("NUCLEUS.LOADING")
]});
if (await NSFWCheck((interaction.member as GuildMember).user.avatarURL({format: "png"}))) {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Your avatar was detected as NSFW, which we do not allow in this server.\nPlease contact one of our staff members if you believe this is a mistake` + step(1))
.setStatus("Danger")
@@ -82,14 +82,14 @@
}
}
if (config.filters.wordFilter) {
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Checking your name is allowed` + step(2))
.setStatus("Warning")
.setEmoji("NUCLEUS.LOADING")
]});
if (TestString((interaction.member as Discord.GuildMember).displayName, config.filters.wordFilter.words.loose, config.filters.wordFilter.words.strict) != "none") {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Your name contained a word we do not allow in this server.\nPlease contact one of our staff members if you believe this is a mistake` + step(2))
.setStatus("Danger")
@@ -97,7 +97,7 @@
]});
}
}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`One moment...` + step(3))
.setStatus("Warning")
@@ -129,7 +129,7 @@
gIcon: interaction.guild.iconURL({format: "png"}),
interaction: interaction
}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Verify")
.setDescription(`Looking good!\nClick the button below to get verified` + step(4))
.setStatus("Success")
diff --git a/src/automations/welcome.ts b/src/automations/welcome.ts
index 11c4844..5b80fbd 100644
--- a/src/automations/welcome.ts
+++ b/src/automations/welcome.ts
@@ -4,7 +4,7 @@
export async function callback(_, member) {
if (member.bot) return
- let config = await client.database.read(member.guild.id);
+ let config = await client.database.guilds.read(member.guild.id);
if (!config.welcome.enabled) return
if (!config.welcome.verificationRequired.role) {