1.1.52 β€’ Published 3 years ago

ogmatrix v1.1.52

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

πŸͺ PARTNER: πŸͺ

Discord BotList

View discord-botlist.eu - your Discord Bot List! We give you the availability to apply your bot and give your bot a page on our website.


discord website

❓ ogmatrix

A simple api to configure and improve youre Discord Bot.


🌸Latest updates:

18th March => README Update.


πŸ“ Package Index


Installation

First you have to install NodeJS. Then you can install the Package with NPM:

$ npm install ogmatrix

❗️❓ Usages

  • Giveaways - Giveaway Client, easy way to manage your giveaways

✈ Importing

// Using Node.js `require()`
const ogmatrix = require("ogmatrix");

// Using ES6 imports
import ogmatrix from "ogmatrix";

πŸ™‹β€β™‚οΈ Support

If you need help with the NPM Package you can easily join my Discord Server, click here


Usages

--

GiveawayClient

Initialising the client

Create a file named "giveaway.js" and put this in it:

const Discord = require('discord.js')
const client = new Discord.Client();
const { GiveawayClient } = require('ogmatrix');

const giveaway = new GiveawayClient(client, {
  mongoURI: "mongoURL",
  emoji: "Emoji",
  defaultColor: "#FFF"
});

module.exports = giveaway;

Methods

start

giveaway.start(
    {
        channel: message.mentions.channels.first(),
        time: ms(time),
        hostedBy: message.author,
        winners: parseInt(args[3]),
        prize: args.slice(4).join(" ")
    }
)

end

// args[1] will be the Message ID!
giveaway.end(args[1], true)

reroll

// args[1] will be the Message ID!
giveaway.reroll(args[1]).catch((err) => message.channel.send(err));

getCurrentGiveaways

giveaway.getCurrentGiveaways(true, false, message).then(data => {
  message.channel.send(data);
});

removeCachedGiveaways

giveaway.removeCachedGiveaways(true, message.guild.id)
1.1.52

3 years ago

1.1.5

3 years ago

1.1.51

3 years ago

1.1.50

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.1.2

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago