Skip to content

Instantly share code, notes, and snippets.

@Assassin-1234
Last active October 2, 2021 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Assassin-1234/61957456b4113687579509b4cf358546 to your computer and use it in GitHub Desktop.
Save Assassin-1234/61957456b4113687579509b4cf358546 to your computer and use it in GitHub Desktop.
A full guide to Nuggies npm requirements!

What is Nuggies npm?

its a utility package for discord bots consisting of many different features which makes developer's life easy by using 2 - 3 lines functions for tasks that can be done in around 500 - 1000 lines. You can see more about it here

install it using

npm install nuggies

What types of Requirements are there in giveaways?

there are 3 types of requirements at the time of writing this with many more on the way, I'll update the gist everytime a new type of requirement is released

  • Role req
  • Weekly Amari req
  • Amari Level req

how do I use them?

Use the create function and pass in requirements as an object.

Nuggies.giveaways.create(bot, { prize: 'test', host: '833713876628406363', winners: 1, endAfter: '10h', requirements: {}, channelID: message.channel.id,
                                                                                                            ^^^^^^^^^^^^

if you want requirements to be enabled, pass in a boolean named enabled and set its value to true (requirements = { enabled: true })

  • Role reqs

to put in role requirements, you need to pass in roles Array consisting of Role IDs that would be set as requirement. Supports Multiple role IDs

requirements = { enabled: true, roles: ['role1', 'role2'...] } / would start a giveaway with role1 and role2 requirement
  • Amari Level Reqs

to put in Amari level requirement, you need to pass in key string which would contain the AMARI BOT API KEY along with amarilevel string containing the required level to enter the giveaway.

requirements = { enabled: true, key: 'APIKEY', amarilevel: '10' } // would start a giveaway with amari level 10 requirement
  • Amari Weekly Exp Req

to put in Amari Weekly Exp requirement, you need to pass in key string which would contain the AMARI BOT API KEY along with weeklyamari string containing the Weekly Exp to enter the giveaway.

requirements = { enabled: true, key: 'APIKEY', amariweekly: '100' } // would start a giveaway with amari 100 weekly exp requirement.

Multiple Requirements

Multiple requirements are supported in giveaways, just make sure you provide the required parameters.

Support

you can join our support server for any server here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment