mocaoi.js
v1.3.1
Published
mocaoi.js offers more useful functions (not available in aoi.js) to your aoi.js bot.
Maintainers
Readme
✨️ 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!
| Functions | Params | Required Params ( true / false ) | |-------------------------|--------------------------------------------------------------|-----------------------------------------| | $mocaoiVersion | [] | [] | | $clientInfo | [info] | [true] | | $sendColoredLog | [text;hex?] | [true, false] | | $commandExists | [name;type?] | [true, false] | | $translate | [from;to;text] | [true, true, true] | | $aoiVersion | [] | [] | | $spotifySearch | [song_name] | [true] | | $isCaps | [percentage%;text] | [true, true] | | $chatAI | [text] | [true] | | $urlCheck | [text] | [true] | | $textToImage | [text] | [true] | | $recreateChannel | [] | [] | | $c ( comment ) | [text] | [true] | | $createTranscript | [channelId?;logChannelId?] | [false, false] | | $join | [separator;...text] | [true, true] | | $reverseText | [text] | [true] | | $fetchGuilds | [separator?;id/name] | [false, false] | | $ceil | [number] | [true] | | $createTable | [tableTitle;...headings;...rows] | [true, true, true] | | $absolute | [number] | [true] | | $floor | [number] | [true] | | $loopLog | [repeatCount;sleepMs;text] | [true, true, true] | | $toRoman | [number] | [true] | | $createGame | [gameType;{json}] | [true, true] | | $advLog | [{json}] | [true] | | $mkdir | [path] | [true] | | $removeFonts | [text] | [true] | | $toChunks | [text, number] | [true, true] | | $createProgressBar | [min, max, elapsedChar, progressChar, emptyChar, barLength] | [true, true, true, true, true, true] | | $toAbbreviation | [text] | [true] |
- $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.1
- Added
$createProgressBarfunction - Added
$toAbbreviationfunction
v1.3.0
- Added
$mkdirfunction - Added
$removeFontsfunction - Added
$toChunksfunction
v1.2.8
- Fixed
$advLogfunction
v1.2.7
- Added
$advLogfunction
v1.2.6
- Fixed version
v1.2.5
- Added
$createGamefunction
v1.2.1
- Added
$loopLogfunction - Added
$toRomanfunction
v1.2.0
- Added
$createTablefunction - Added
$absolutefunction - Added
$floorfunction
v1.1.5
- Added
$joinfunction - Added
$reverseTextfunction - Added
$fetchGuildsfunction - Added
$ceilfunction
v1.1.4
- Updated
$recreateChannelfunction- New Params: [chanelID , returnID?]
- Added
$createTranscriptfunction
v1.1.3
- Added
$recreateChannelfunction - Added
$cfunction
v1.1.2
- Some changes
v1.1.1
- Added
$textToImagefunction
v1.0.11
- Added
$chatAIfunction - Added
$isCapsfunction
NPM | GitHub | Support Server | mocaoi.db
