ogmatrix
v1.1.52
Published
A NPM Package for your Discord Bot
Downloads
9
Maintainers
Readme
🪐 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.
❓ 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)