1.3.1 • Published 5 months ago

mocaoi.js v1.3.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

NPM downloads     NPM version     License    


✨️ Information

  • What is mocaoi.js: mocaoi.js module is a module made for aoi.js. This module contains custom functions that are not available in aoi.js. And it offers you more useful functions.
  • Warning: only supports aoi.js version: v6+

  • Explanation for those who do not know aoi.js:

    • aoi.js is a JavaScript library that is designed to make it easy to build Discord bots.

    • It is open-source and free to use, and provides a simple, easy-to-use interface for interacting with the Discord API and handling events.

    • aoi.js is suitable for beginners who are new to building bots, as well as experienced developers who want to save time and streamline their workflow.

Extras;

  • If you want to download the mocaoi database module Click.

📒 Setup

  • To get started with mocaoi.js, follow these steps:
  • index.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",
    },
  },
});



// mocaoi.js setup
const { Plugin } = require("mocaoi.js");
const maoi = new Plugin({
  executeOnLog: true, // executeOnLog, mocaoi.js log is sent to the console when your project is started.
  loadFunctions: true, // loadFunctions is required for the functions to work.
  autoUpdate: true, // autoUpdate automatically updates if a new update is available.
  client: client // We define our client object.
});
  • If you come to our Discord support server, you can get more detailed information about function usage!
FunctionsParamsRequired Params ( true / false )
$mocaoiVersion[][]
$clientInfoinfotrue
$sendColoredLogtext;hex?true, false
$commandExistsname;type?true, false
$translatefrom;to;texttrue, true, true
$aoiVersion[][]
$spotifySearchsong_nametrue
$isCapspercentage%;texttrue, true
$chatAItexttrue
$urlChecktexttrue
$textToImagetexttrue
$recreateChannel[][]
$c ( comment )texttrue
$createTranscriptchannelId?;logChannelId?false, false
$joinseparator;...texttrue, true
$reverseTexttexttrue
$fetchGuildsseparator?;id/namefalse, false
$ceilnumbertrue
$createTabletableTitle;...headings;...rowstrue, true, true
$absolutenumbertrue
$floornumbertrue
$loopLogrepeatCount;sleepMs;texttrue, true, true
$toRomannumbertrue
$createGamegameType;{json}true, true
$advLog{json}true
$mkdirpathtrue
$removeFontstexttrue
$toChunkstext, numbertrue, true
$createProgressBarmin, max, elapsedChar, progressChar, emptyChar, barLengthtrue, true, true, true, true, true
$toAbbreviationtexttrue
  • **$clientInfo Parameters**
    • ispublic
    • isverified
    • memory
    • rss
    • platform
    • arch

  • Creating game $createGame[GAME_TYPE;{JSON}]

GAME_TYPE: rps

$createGame[rps;{
  "gamedata": {
    "buttons": {
      "rock": "🪨",
      "scissors": "✂️",
      "paper": "📃"
    },
    "result": {
      "win": "Congratulations! You won the game by choosing {your_choice}. (My choice was {bot_choice}.)",
      "lose": "You lost. I chose {bot_choice}.",
      "draw": "It's a draw. I also chose {bot_choice}."
    },
    "embeddata": {
      "color": "Yellow",
      "title": "Rock Paper Scissors",
      "description": "click!"
    }
  }
}]
  • creating command;
module.exports = {
  name: "rps",
  aliases: ["rockpaperscissors"],
  code: `
$createGame[rps;{
  "gamedata": {
    "buttons": {
      "rock": "🪨",
      "scissors": "✂️",
      "paper": "📃"
    },
    "result": {
      "win": "Congratulations! You won the game by choosing {your_choice}. (My choice was {bot_choice}.)",
      "lose": "You lost. I chose {bot_choice}.",
      "draw": "It's a draw. I also chose {bot_choice}."
    },
    "embeddata": {
      "color": "Yellow",
      "title": "Rock Paper Scissors",
      "description": "click!"
    }
  }
}]
`
}

v1.3.0

  • Added $mkdir function
  • Added $removeFonts function
  • Added $toChunks function

v1.2.8

  • Fixed $advLog function

v1.2.7

  • Added $advLog function

v1.2.6

  • Fixed version

v1.2.5

  • Added $createGame function

v1.2.1

  • Added $loopLog function
  • Added $toRoman function

v1.2.0

  • Added $createTable function
  • Added $absolute function
  • Added $floor function

v1.1.5

  • Added $join function
  • Added $reverseText function
  • Added $fetchGuilds function
  • Added $ceil function

v1.1.4

v1.1.3

  • Added $recreateChannel function
  • Added $c function

v1.1.2

  • Some changes

v1.1.1

  • Added $textToImage function

v1.0.11

  • Added $chatAI function
  • Added $isCaps function

NPM | GitHub | Support Server | mocaoi.db

1.3.1

5 months ago

1.3.0

5 months ago

1.2.8

5 months ago

1.2.7

5 months ago

1.2.6

5 months ago

1.2.5

5 months ago

1.2.1

5 months ago

1.2.0

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

6 months ago

1.1.0

6 months ago

1.0.11

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago