Skip to content

Commit

Permalink
should jsdoc in typescript be called tsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jan 29, 2024
1 parent 42d40c2 commit abc62d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/helpers/functions/getTexture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,28 @@ import {
Contributor,
GalleryTexture,
MinecraftEdition,
Pack,
} from "@interfaces/database";
import { animateToAttachment } from "@images/animate";
import minecraftSorter from "@utility/minecraftSorter";
import formatPack from "@utility/formatPack";
import { textureButtons } from "@utility/buttons";
import { Image, loadImage } from "@napi-rs/canvas";
import { toTitleCase } from "@utility/methods";

/**
* Create a full texture embed with provided information
* @author Juknum, Evorp, RobertR11
* @param interaction interaction to reply to
* @param texture texture data to use
* @param pack pack to get authors and formatting from
* @returns reply options
*/
export async function getTexture(interaction: Interaction, texture: Texture, pack: string) {
const apiUrl = interaction.client.tokens.apiUrl;
const isAnimated = Object.keys(texture.mcmeta).length;
const contributionJSON: Contributor[] = (await axios.get(`${apiUrl}contributions/authors`)).data;

const { data: packData } = await axios.get(`${apiUrl}packs/${pack}`);
const packData: Pack = (await axios.get(`${apiUrl}packs/${pack}`)).data;

const files: AttachmentBuilder[] = [];
const embed = new EmbedBuilder().setTitle(`[#${texture.id}] ${texture.name}`).setFooter({
Expand Down

0 comments on commit abc62d0

Please sign in to comment.