Skip to content

Commit

Permalink
Merge pull request #67 from Nuggies-bot/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Assassin-1234 authored Sep 28, 2021
2 parents 5bc845b + c73eb22 commit 63f8767
Show file tree
Hide file tree
Showing 33 changed files with 660 additions and 544 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"es6": true
},
"parserOptions": {
"ecmaVersion": 2019
"ecmaVersion": "latest"
},
"rules": {
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
Expand Down
9 changes: 5 additions & 4 deletions index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-inline-comments */
/* eslint-disable no-unused-vars */
// Make sure you use `npm run test` when testing the package!
const defaultManagerOptions = {
const defaultGiveawayMessages = {
dmWinner: true,
giveaway: 'πŸŽ‰πŸŽ‰ **GIVEAWAY!** πŸŽ‰πŸŽ‰',
giveawayDescription: '🎁 Prize: **{prize}**\n🎊 Hosted by: {hostedBy}\n⏲️ Winner(s): `{winners}`\n\nRequirements: {requirements}',
Expand Down Expand Up @@ -29,7 +29,9 @@ const bot = new Discord.Client({ intents: 32767 });
bot.login(process.env.token);

Nuggies.handleInteractions(bot);
Nuggies.giveaways.Messages(bot, defaultManagerOptions);
Nuggies.Messages(bot, {
giveawayOptions: defaultGiveawayMessages,
});
Nuggies.connect(process.env.mongo);
bot.on('messageCreate', async (message) => {
if (message.author.bot || message.channel.type === 'dm') return;
Expand All @@ -44,8 +46,7 @@ bot.on('messageCreate', async (message) => {
if (!cmd) return;

if (cmd.toLowerCase() === 'test') {
Nuggies.giveaways.create({
message: message, prize: 'test', host: '833713876628406363', winners: 1, endAfter: '10s', requirements: [], channel: message.channel.id,
Nuggies.giveaways.create(bot, { prize: 'test', host: '833713876628406363', winners: 1, endAfter: '10s', requirements: [], channelID: message.channel.id,
});
}
else if (cmd.toLowerCase() == 'test') {
Expand Down
Loading

0 comments on commit 63f8767

Please sign in to comment.