feat: add banner command with ASCII art display
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
import command from "../../config.json" assert { type: "json" };
|
||||||
|
|
||||||
|
const createBanner = (): string[] => {
|
||||||
|
const banner: string[] = [];
|
||||||
|
banner.push("<br>");
|
||||||
|
command.ascii.forEach((ele) => {
|
||||||
|
let bannerString = "";
|
||||||
|
for (let i = 0; i < ele.length; i++) {
|
||||||
|
if (ele[i] === " ") {
|
||||||
|
bannerString += " ";
|
||||||
|
} else {
|
||||||
|
bannerString += ele[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let eleToPush = `<pre>${bannerString}</pre>`;
|
||||||
|
banner.push(eleToPush);
|
||||||
|
});
|
||||||
|
banner.push("<br>");
|
||||||
|
banner.push("Welcome to Joshua UwU <3");
|
||||||
|
banner.push(
|
||||||
|
"Type <span class='command'>'help'</span> for a list of all available commands."
|
||||||
|
);
|
||||||
|
banner.push("<br>");
|
||||||
|
return banner;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const BANNER = createBanner();
|
||||||
Reference in New Issue
Block a user