disco-math.js

3.0.0 • Public • Published

Installation

npm install disco-math.js

In the console/terminal.

Add

const discordMath = require("disco-math.js");
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('message', message => {
    const prefix = "!";
    const args = message.content.slice(prefix.length).trim().split(' ');
    if (message.content.startsWith(`${prefix}add`)) {
        discordMath.add(args[1], args[2], message)
    }
})

client.login("SuperSecretToken")

Sub

const discordMath = require("disco-math.js");
const Discord = require('discord.js');
const client = new Discord.Client();


client.on('message', message => {
    const prefix = "!";
    const args = message.content.slice(prefix.length).trim().split(' ');
    if (message.content.startsWith(`${prefix}sub`)) {
        discordMath.sub(args[1], args[2], message)
    }
})

client.login("SuperSecretToken")

Multiply

const discordMath = require("disco-math.js");
const Discord = require('discord.js');
const client = new Discord.Client();


client.on('message', message => {
    const prefix = "!";
    const args = message.content.slice(prefix.length).trim().split(' ');
    if (message.content.startsWith(`${prefix}multiply`)) {
        discordMath.multiply(args[1], args[2], message)
    }
})

client.login("SuperSecretToken")

Divide

const discordMath = require("disco-math.js");
const Discord = require('discord.js');
const client = new Discord.Client();


client.on('message', message => {
    const prefix = "!";
    const args = message.content.slice(prefix.length).trim().split(' ');
    if (message.content.startsWith(`${prefix}divide`)) {
        discordMath.divide(args[1], args[2], message)
    }
})

client.login("SuperSecretToken")

/disco-math.js/

    Package Sidebar

    Install

    npm i disco-math.js

    Weekly Downloads

    0

    Version

    3.0.0

    License

    ISC

    Unpacked Size

    8.61 kB

    Total Files

    4

    Last publish

    Collaborators

    • kokoren123