{"id":13454796,"url":"https://github.com/TreeFarmer/embed-table","last_synced_at":"2025-03-24T06:31:27.626Z","repository":{"id":57222930,"uuid":"399610123","full_name":"TreeFarmer/embed-table","owner":"TreeFarmer","description":"Easily make nice looking text tables for Discord's embed fields and descriptions.","archived":false,"fork":false,"pushed_at":"2023-04-20T04:55:54.000Z","size":457,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-03T23:16:47.386Z","etag":null,"topics":["discord","discordjs","messageembed","table"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/embed-table","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TreeFarmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-08-24T21:33:00.000Z","updated_at":"2024-05-08T03:45:30.000Z","dependencies_parsed_at":"2024-02-17T03:42:26.860Z","dependency_job_id":null,"html_url":"https://github.com/TreeFarmer/embed-table","commit_stats":{"total_commits":80,"total_committers":4,"mean_commits":20.0,"dds":0.07499999999999996,"last_synced_commit":"12cd90ed8298996ec06d05fe833910ffb9548ae5"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TreeFarmer%2Fembed-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TreeFarmer%2Fembed-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TreeFarmer%2Fembed-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TreeFarmer%2Fembed-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TreeFarmer","download_url":"https://codeload.github.com/TreeFarmer/embed-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245222565,"owners_count":20580185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discordjs","messageembed","table"],"created_at":"2024-07-31T08:00:58.013Z","updated_at":"2025-03-24T06:31:27.174Z","avatar_url":"https://github.com/TreeFarmer.png","language":"TypeScript","readme":"# Embed-Table\n\nEasily make nice looking text tables for Discord's embed fields and descriptions.\n\n# Installation\n\nInstall with `npm install embed-table` and it will be installed.\n\n# Important\n\n- `titles` are the column titles that will display in the **name** value of the Embed Field. The `titleIndexes` are the indexes of where the titles start in the generated string, it is recommended to have the first title at `0`. [**See example below.**](https://www.npmjs.com/package/embed-table#output)\n- If the start values are not greater than the previous column name, an error will be thrown about an invalid count value.\n- **Make sure** that your `titles`, `titleIndexes` and `columnIndexes` all are the same number of values, or else things get messy. An option to make the field inline is available since the method creates a complete field object. \n- It is easiet to manage where your data lines up in the columns when using backticks ( ` ) at the start and end of the rows, this makes any character the same width. \n\n# Basic Usage (with Discord.js v14+)\n```ts\nimport { Table } from 'embed-table';\nimport { EmbedBuilder } from 'discord.js';\n\nconst table = new Table({\n  titles: ['Level', 'Money', 'Wins'],\n  titleIndexes: [0, 8, 16],\n  columnIndexes: [0, 6, 14],\n  start: '`',\n  end: '`',\n  padEnd: 3\n});\n\ntable.addRow(['1', '$120', '2'], { override: 4 });\ntable.addRow(['72', '$10', '25'], { override: 0 });\ntable.addRow(['614', '$1220', '12']);\n\n// Use this 'embed' when sending a message to a channel.\nconst embed = new EmbedBuilder().setFields(table.toField());\n\n// Use this 'tableString' in a plain text area, (embed description or a regular message)\nconst string = table.toString();\n```\n\n# Embed Output\n![output](https://i.imgur.com/tQSKSJN.png)\n\n# API\nRead the documentation for embed-table @ [**embed-table.treefarmer.xyz**](https://embed-table.treefarmer.xyz/)\n\n# Contributing\n\nFeel free to contribute however, it is appreciated! Join the community server @ [**treefarmer.xyz/discord**](https://treefarmer.xyz/discord)","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTreeFarmer%2Fembed-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTreeFarmer%2Fembed-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTreeFarmer%2Fembed-table/lists"}