feat: initial commit

This commit is contained in:
Naomi Carrigan
2024-09-26 11:37:00 -07:00
commit 1339b63378
86 changed files with 12036 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { join } from "path";
import { AttachmentData } from "../../interfaces/commands/AttachmentData";
import { RegionName } from "../../interfaces/weather/names/RegionName";
/**
* Selects one of the random banner images from the banner folder.
*
* @param {RegionName} region The name of the region.
* @returns {AttachmentData} The banner image attachment data.
*/
export const getBannerImage = (region: RegionName): AttachmentData => {
const fileName = `${region}${Math.ceil(Math.random() * 3)}.png`;
const filePath = join(process.cwd(), "src", "assets", "banners", fileName);
return {
attachmentString: `attachment://${fileName}`,
filePath,
};
};