# aoi.tables

> easy tables for your console data (aoi.js)

Latest version **1.0.1** (published 2023-12-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install aoi.tables
pnpm add aoi.tables
yarn add aoi.tables
bun add aoi.tables
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-12-02 |
| First published | 2023-12-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 50.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | warfdev |
| Maintainers | warfdev |
| Keywords | aoi.js, aoi, discord, ascii-table, console, tables, utils, warfdev, aoijs, console-table, discordbot, bot |

## Links

- npm: https://www.npmjs.com/package/aoi.tables
- npm.io page: https://npm.io/package/aoi.tables

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [ascii-table](https://npm.io/package/ascii-table.md) ^0.0.9

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-12-02
- 1.0.0 — 2023-12-01

## README

<p align="center">
  <a href="https://www.npmjs.com/package/mocaoi.js?activeTab=readme">
    <img width="300" src="https://cdn.discordapp.com/attachments/1115344550148456478/1180196704134381699/20231201_201945.png?ex=657c8ad5&is=656a15d5&hm=a5c14c243231d76642411eee32cacb0a702744b44cb0218abea6bdc0a63c67ad&" alt="aoitables">
  </a>
</p>

<div align="center">
  <b>easy tables for your console data (aoi.js).</b>
</div>

<br/>

---

### 📒 Setup
- index.js ( your main file )
```js
const { AoiClient } = require("aoi.js");
const client = new AoiClient({
  token: "Discord Bot Token",
  prefix: "Discord Bot Prefix",
  intents: ["MessageContent", "Guilds", "GuildMessages"],
  events: ["onMessage", "onInteractionCreate"],
  database: {
    type: "aoi.db",
    db: require("@akarui/aoi.db"),
    tables: ["main"],
    path: "./database/",
    extraOptions: {
      dbType: "KeyValue",
    },
  },
});


// aoi.tables Setup
const tables = require("aoi.tables");
try {
  tables.load({
    client: client,
    errorsType: "message",
    version: "v6"
  });
  
} catch (err) {
  console.error(err);
}
```

- If you come to our [Discord support](https://discord.com/invite/RVN8dGhNEY) server, you can get more detailed information about function usage!

<details>
  <summary>Function's list</summary>

| Functions                 | Params                | Required Params(true/false)          |
|---------------------------|-----------------------|--------------------------------------|
| $tableCreate              | [{ json }]            | [ true ]                             |
| $setTableColor            | [colorType , table]   | [ true, true ]                       |

</details>

<br/>

<details>
  <summary>Function's Example Usage</summary>

### $tableCreate Function
- params: [{ json }]
- example usage;
```js
module.exports = {
  name: "createTable",
  code: `
$sendMessage[
\`\`\`
$get[t]
\`\`\`]
 $let[t;$tableCreate[{
  "name": "exampleTable",
  "data": {
    "headings": ["Column1", "Column2", "Column3"],
    "rows": ["1, A, X", "2, B, Y", "3, C, Z"]
  }
}]]
`
}
```
- Code result;
![Result Image](https://cdn.discordapp.com/attachments/1115344550148456478/1180196759260102739/Screenshot_20231201_200018_Discord.jpg?ex=657c8ae2&is=656a15e2&hm=4b48b5adc13b2249b6d0cf05b1da09c7cd8a0dcd72574cdbec3eb12a7c0ddab2&)

---

- with special border;
```js
module.exports = {
  name: "createTable",
  code: `
$sendMessage[
\`\`\`
$get[t]
\`\`\`]
 $let[t;$tableCreate[{
  "name": "exampleTable",
  "data": {
    "headings": ["Column1", "Column2", "Column3"],
    "rows": ["1, A, X", "2, B, Y", "3, C, Z"],
    "setBorder": "*"
  }
}]]
`
}
```
- Code result;
![Result Image with border](https://cdn.discordapp.com/attachments/1115344550148456478/1180204631796760656/Screenshot_20231201_205142_Discord.jpg?ex=657c9237&is=656a1d37&hm=064a0bd8fe5dfda080049aff65097795582923e28d58e6fd156738167b965668&)

<br/>

---

<br/>

### $logTableColored Function
- params: [ colorType;table ]
- example usage;
```js
module.exports = {
  name: "logColored",
  code: `
$logTableColored[blue;$get[t]]
$let[t;$tableCreate[{
  "name": "exampleTable",
  "data": {
    "headings": ["Column1", "Column2", "Column3"],
    "rows": ["1, A, X", "2, B, Y", "3, C, Z"]
  }
}]]
`
}
```
- Code result;
![Result Image](https://cdn.discordapp.com/attachments/1115344550148456478/1180196758979104778/Screenshot_20231201_200041_Termux.jpg?ex=657c8ae2&is=656a15e2&hm=dec8ba7a55a2d4db730d404a0648f83b0154bc996872f307324593cc25027dc5&)

### Color list:
- red
- green
- yellow
- blue
- magenta
- cyan
- white

### To send in bold font:
- bRed
- bGreen
- bYellow
- bBlue
- bMagenta
- bCyan
- bWhite

<br/>

---

</details>

<br/>

---

<br/>

<div align="center">

[Mocaoi.js ❤️](https://www.npmjs.com/package/mocaoi.js?activeTab=readme)

</div>

---
_Source: https://npm.io/package/aoi.tables · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
