Added Eslint GitHub Action and Prettier

This commit is contained in:
Ahmad 2024-12-21 18:13:18 -05:00
parent d8df48438d
commit 512b7526ab
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
21 changed files with 480 additions and 293 deletions

View file

@ -45,5 +45,8 @@ export async function removeMember(discordId: string) {
}
export async function getMember(discordId: string) {
return await db.select().from(memberTable).where(eq(memberTable.discordId, discordId));
}
return await db
.select()
.from(memberTable)
.where(eq(memberTable.discordId, discordId));
}

View file

@ -27,7 +27,7 @@ const commandFiles = getFilesRecursively(commandsPath);
export const deployCommands = async () => {
try {
console.log(
`Started refreshing ${commandFiles.length} application (/) commands.`
`Started refreshing ${commandFiles.length} application (/) commands.`,
);
const commands = commandFiles.map(async (file) => {
@ -43,14 +43,14 @@ export const deployCommands = async () => {
}
else {
console.warn(
`[WARNING] The command at ${file} is missing a required "data" or "execute" property.`
`[WARNING] The command at ${file} is missing a required "data" or "execute" property.`,
);
return null;
}
});
const validCommands = await Promise.all(
commands.filter((command) => command !== null)
commands.filter((command) => command !== null),
);
return validCommands;