npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mocaoi.js

v1.3.1

Published

mocaoi.js offers more useful functions (not available in aoi.js) to your aoi.js bot.

Downloads

52

Readme

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!

| 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 $createProgressBar function
  • Added $toAbbreviation function

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

  • Updated $recreateChannel function
    • New Params: [chanelID , returnID?]
  • Added $createTranscript function

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