Skip to content

Commit

Permalink
Merge pull request appujet#621 from Beelzebub2/patch-7
Browse files Browse the repository at this point in the history
Add bot name to console title
  • Loading branch information
LucasB25 authored Jul 14, 2024
2 parents 462190d + b290bb4 commit 98c993b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,24 @@ class ThemeSelector {

const theme = new ThemeSelector();

/**
* Sets the console window title.
* @param title - The new title for the console window.
*/
function setConsoleTitle(title: string): void {
// Write the escape sequence to change the console title
process.stdout.write(`\x1b]0;${title}\x07`);
}

async function main(): Promise<void> {
try {
if (!fs.existsSync("./src/utils/LavaLogo.txt")) {
logger.error("LavaLogo.txt file is missing");
process.exit(1);
}
console.clear();
// Set a custom title for the console window
setConsoleTitle("Lavamusic");
const logFile = fs.readFileSync("./src/utils/LavaLogo.txt", "utf-8");
// biome-ignore lint/suspicious/noConsoleLog: <explanation>
console.log(theme.purpleNeon(logFile));
Expand Down

0 comments on commit 98c993b

Please sign in to comment.