-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update eslint config, refactor logger usage across the project, add b…
…ase path
- Loading branch information
1 parent
a458dd2
commit 3be2ff6
Showing
10 changed files
with
166 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
import eslintConfig from "@igorkowalczyk/eslint-config/flat"; | ||
import eslintConfig from "@igorkowalczyk/eslint-config"; | ||
|
||
export default [...eslintConfig]; | ||
export default [ | ||
// prettier | ||
...eslintConfig.base, | ||
...eslintConfig.node, | ||
...eslintConfig.typescript, | ||
...eslintConfig.prettier, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { ActivityType, Client, TextChannel } from "discord.js"; | ||
import { logger } from "../../utils/logger.js"; | ||
import { defaultConfig } from "../../config.js"; | ||
import { defaultConfig } from "@/config"; | ||
import { Logger } from "@/utils/logger"; | ||
|
||
export async function ready(client: Client): Promise<void> { | ||
export function ready(client: Client): void { | ||
try { | ||
logger("ready", `Logged in as ${client.user?.tag}! (ID: ${client.user?.id})`); | ||
if (!defaultConfig.channel) return logger("error", "Channel not found! Please check your CHANNEL_ID .env variable."); | ||
Logger("ready", `Logged in as ${client.user?.tag}! (ID: ${client.user?.id})`); | ||
if (!defaultConfig.channel) return Logger("error", "Channel not found! Please check your CHANNEL_ID .env variable."); | ||
const channel = client.channels.cache.get(defaultConfig.channel) as TextChannel; | ||
logger("ready", `Watching for commands in ${channel.guild.name}#${channel.name}`); | ||
Logger("ready", `Watching for commands in ${channel.guild.name}#${channel.name}`); | ||
client.user?.setActivity("👀 Watching all ports!", { type: ActivityType.Custom }); | ||
} catch (error) { | ||
logger("error", `Error setting activity: ${error}`); | ||
Logger("error", `Error setting activity: ${error}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.