Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/reflex/welcome.ts b/src/reflex/welcome.ts
index 9be71d5..b4bc374 100644
--- a/src/reflex/welcome.ts
+++ b/src/reflex/welcome.ts
@@ -1,39 +1,37 @@
-import convertCurlyBracketString from '../utils/convertCurlyBracketString.js'
-import client from '../utils/client.js';
-import EmojiEmbed from '../utils/generateEmojiEmbed.js';
+import convertCurlyBracketString from "../utils/convertCurlyBracketString.js";
+import client from "../utils/client.js";
+import EmojiEmbed from "../utils/generateEmojiEmbed.js";
export async function callback(_, member) {
- if (member.bot) return
- let config = await client.database.guilds.read(member.guild.id);
- if (!config.welcome.enabled) return
+ if (member.bot) return;
+ const config = await client.database.guilds.read(member.guild.id);
+ if (!config.welcome.enabled) return;
if (config.welcome.channel) {
- let string = config.welcome.message
+ let string = config.welcome.message;
if (string) {
- string = await convertCurlyBracketString(string, member.id, member.displayName, member.guild.name, member.guild.members)
- if (config.welcome.channel === 'dm') {
- try {
- await member.send({
- embeds: [new EmojiEmbed()
- .setDescription(string)
- .setStatus('Success')
- ]
- })
- } catch {}
+ string = await convertCurlyBracketString(string, member.id, member.displayName, member.guild.name, member.guild.members);
+ if (config.welcome.channel === "dm") {
+ await member.send({
+ embeds: [new EmojiEmbed()
+ .setDescription(string)
+ .setStatus("Success")
+ ]
+ });
} else {
- let channel = await member.guild.channels.fetch(config.welcome.channel)
- if (channel.guild.id !== member.guild.id) return
- if (!channel) return
+ const channel = await member.guild.channels.fetch(config.welcome.channel);
+ if (channel.guild.id !== member.guild.id) return;
+ if (!channel) return;
try {
await channel.send({
embeds: [new EmojiEmbed()
.setDescription(string)
- .setStatus('Success')
+ .setStatus("Success")
],
- content: (config.welcome.ping ? `<@${config.welcome.ping}>` : '') + `<@${member.id}>`
- })
+ content: (config.welcome.ping ? `<@${config.welcome.ping}>` : "") + `<@${member.id}>`
+ });
} catch (err) {
- console.error(err) // SEN
+ console.error(err); // TODO: SEN
}
}
}