mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-06-07 15:39:30 +00:00
Added Eslint GitHub Action and Prettier
This commit is contained in:
parent
d8df48438d
commit
512b7526ab
21 changed files with 480 additions and 293 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue