Have ideas to improve npm?Join in the discussion! »

discord-scores

1.0.6 • Public • Published

DiscordScores

const client = new Discord.Client()

Start using

Simple use:

const score = new DiscordScores( client, '👍' )
 
score.on( 'add', event => {
 
    // 👍 is add (event.emoji)
    // by event.user 
    // on event.message
    // in event.channel
    // for event.message.author
 
})

With value:

const score = new DiscordScores( client, { '👍': 1 } )
 
score.on( 'remove', event => {
 
    // 👍 is remove
    // The score of message.author drops by 1 (event.value)
 
})

Multi entries:

const score = new DiscordScores( client, [
    { '👍': 1 }, 
    { '👎': -1 } 
])
 
score.on( 'remove', event => {
 
    // 👎 is remove
    // The score of message.author increases by 1 (the reverse of this value)
 
})

Simple multi entries:

const score = new DiscordScores( client, ['👍','👎'])
 
score.on( 'add', event => {
 
    // 👍 is add
    // Anyway...
 
})

It's up to you to do the overlay!

  • Stockage in database
  • Anti cheat for double accounts
  • Your personnal values and emojis

Custom emojis are accepted!

Install

npm i discord-scores

DownloadsWeekly Downloads

8

Version

1.0.6

License

ISC

Unpacked Size

5.22 kB

Total Files

3

Last publish

Collaborators

  • avatar