Constructors

Accessors

  • get check(): {
        hex(hex): boolean;
    }
  • Utilities oriented to check whether a data is what is needed

    Returns {
        hex(hex): boolean;
    }

    • hex:function
      • Checks if the provided string is a hex

        Parameters

        • hex: string

          String to analize

        Returns boolean

        boolean

  • get custom(): {
        [k: string]: T;
    }
  • This is where your custom functions are stored

    Returns {
        [k: string]: T;
    }

    • [k: string]: T
  • get discord(): {
        allMembersCount(client): number;
        argsIfy(message, prefix?): string[];
        getMember(message, id, returnAuthor?): Promise<null | GuildMember>;
        getUser(message, id, returnAuthor?): Promise<null | User>;
        isBanned(user, guild): boolean;
        voted(bot, id, token): Promise<boolean>;
        webhook(url): WebhookClient;
    }
  • Utilities oriented to a Discord Client

    Returns {
        allMembersCount(client): number;
        argsIfy(message, prefix?): string[];
        getMember(message, id, returnAuthor?): Promise<null | GuildMember>;
        getUser(message, id, returnAuthor?): Promise<null | User>;
        isBanned(user, guild): boolean;
        voted(bot, id, token): Promise<boolean>;
        webhook(url): WebhookClient;
    }

    • allMembersCount:function
      • Get the entire list of users of a bot

        Parameters

        Returns number

        number

    • argsIfy:function
      • Generate an array with strings based on a string, in turn you can give a prefix to be deleted from the first word

        Parameters

        • message: string
        • Optional prefix: string

          This is the prefix to be removed, it is optional

        Returns string[]

        string[]

    • getMember:function
      • Gets a member from a server, otherwise will return to the author if desired or null

        Parameters

        • message: Message<boolean>
        • id: string

          string

        • returnAuthor: boolean = false

          boolean

        Returns Promise<null | GuildMember>

        Promise<GuildMember | null>

    • getUser:function
      • Gets a user, otherwise will return to the author if desired or null

        Parameters

        • message: Message<boolean>
        • id: string

          string

        • returnAuthor: boolean = false

          boolean

        Returns Promise<null | User>

        Promise<User | null>

    • isBanned:function
      • Checks if the provided id was banned from the given Guild

        Parameters

        • user: string

          User ID

        • guild: Guild

        Returns boolean

        boolean

    • voted:function
      • Check if the given user has voted for a bot on the top.gg page.

        Parameters

        • bot: string

          Your discord bot's id

        • id: string

          ID of the user

        • token: string

          Your top.gg token, to get it see authentication

        Returns Promise<boolean>

        Promise

    • webhook:function
      • Creates a webhook client to interact with and use a webhook

        Parameters

        • url: string

          Webhook URL

        Returns WebhookClient

        WebhookClient

  • get fake(): {
        ipv4: (() => string);
        ipv6: (() => string);
    }
  • Utilities oriented to falsify data

    Returns {
        ipv4: (() => string);
        ipv6: (() => string);
    }

    • ipv4: (() => string)

      Generate a fake IPv4

      Returns

      Fake id, like: 123.234.243.223

        • (): string
        • Returns string

    • ipv6: (() => string)

      Generate a fake IPv6

      Returns

      Fake id, like: 2001:8a2d:6c3c:6391:18f1:e073:73dd:a025

        • (): string
        • Returns string

  • get fetch(): {
        fetch: ((input, init?) => Promise<Response>);
        mcserver(ip): Promise<MCServer>;
        rule34(tags?): Promise<Rule34>;
    }
  • Utilities oriented to fetch certain apis

    Returns {
        fetch: ((input, init?) => Promise<Response>);
        mcserver(ip): Promise<MCServer>;
        rule34(tags?): Promise<Rule34>;
    }

    • fetch: ((input, init?) => Promise<Response>)

      Exactly the same as the JavaScript fetch function, see MDN Docs

      Returns

      Promise

        • (input, init?): Promise<Response>
        • Parameters

          Returns Promise<Response>

    • mcserver:function
    • rule34:function
      • Gets a random post with tags to choose from the Rule34 api.
        [WARNING] This function returns and contains mostly explicit content, the use of this function is under your own responsibility.

        Parameters

        • Optional tags: string[]

          Tags to search. Example: ["video"]

        Returns Promise<Rule34>

        Promise

  • get media(): {
        rei: (() => string);
        soi: (() => string);
        meme(idiom): Promise<RedditMeme>;
    }
  • Returns {
        rei: (() => string);
        soi: (() => string);
        meme(idiom): Promise<RedditMeme>;
    }

    • rei: (() => string)

      Gets a random image of Rei Plush

        • (): string
        • Returns string

    • soi: (() => string)

      Gets a random meme of Shot-On-iPhone

        • (): string
        • Returns string

    • meme:function
  • get random(): {
        number(min, max, decimals?): number;
        onArray<T>(array, length?): T[];
        string(length, config): string;
    }
  • Utilities oriented to obtain random values

    Returns {
        number(min, max, decimals?): number;
        onArray<T>(array, length?): T[];
        string(length, config): string;
    }

    • number:function
      • Get a random number between two of your choice

        Parameters

        • min: number

          Minimum value

        • max: number

          Maximum value

        • decimals: boolean = false

          Number of decimals

        Returns number

        number

    • onArray:function
      • From an array, returns random values in a new array.

        Type Parameters

        • T

        Parameters

        • array: T[]

          Array to use

        • length: number = 1

          Length of the new array

        Returns T[]

        string[]

    • string:function
      • Get a random string of your choice

        Parameters

        • length: number

          Length of the string

        • config: RandomString

          RandomString

        Returns string

        string

  • get runtime(): {
        uptime: (() => number);
        cpu(decimals?): string;
        ram(decimals?, format?): string;
    }
  • Runtime performance-oriented utilities

    Returns {
        uptime: (() => number);
        cpu(decimals?): string;
        ram(decimals?, format?): string;
    }

    • uptime: (() => number)

      Get run time in milliseconds

      Returns

      number

        • (): number
        • Returns number

    • cpu:function
      • Gets the percentage of processor usage, and also rounds it to the number of decimal places of your choice.

        Parameters

        • decimals: number = 2

          Number of decimals, by default 2

        Returns string

        string

    • ram:function
      • Gets the ram memory usage in: Bytes (B), KiloBytes (KB), MegaBytes (MB), or GigaBytes (GB); this is rounded to the decimal places you want.

        Parameters

        • decimals: number = 2

          Number of decimals, by default 2

        • format: "B" | "KB" | "MB" | "GB" = "KB"

          Format to display RAM consumption, by default KiloBytes (KB)

        Returns string

        string

Methods

  • With this you create a custom function

    Parameters

    • name: string

      Name of the function

    • f: Function

      Function to save

    Returns boolean

    boolean

  • With this you deletes a custom function

    Parameters

    • name: string

      Name of the function

    Returns boolean

    boolean

  • Evals a code in TypeScript (Compatible with JavaScript) Note: At the end of the code you should put a "return" to mark what will be returned.

    Parameters

    • code: string

      Code to eval

    Returns Promise<EvalRespose>

    Promise

  • Restart the runtime process

    Returns void

  • Get the code of any function of the package or any function that you want to use.

    Parameters

    • method: string | Function

      Path of the function in class or a function.

    Returns string

    string

  • Updates the package

    Parameters

    • manager: string = "npm install"

      Manager to use, default: npm install

    Returns false | void