Git Product home page Git Product logo

djs-giveaway's Introduction

Djs Giveaway

discordBadge npm npm

Features

⏱️ Easy to use!
⚙️ Full configuration
📁 Support for all databases! (default is json)
🔄 Automatic restart after bot crash!

Examples



Code Examples

⏱️ Calling the module

const djsGiveaway = require("djs-giveaway");
const giveaway = new djsGiveaway(client);

Giveaway Options

new djsGiveaway(client, {
    countdownUpdateInterval: 1000,
    reaction: "🎁",
    embed: {
        color: "BLUE"
    }
});

Giveaway Start

giveaway.create({
    guildId: message.guild.id,
    channelId: message.channel.id,
    prize: "Test",
    duration: 10000,
    winnersCount: 1
});

For role-specific raffle

giveaway.create({
    guildId: message.guild.id,
    channelId: message.channel.id,
    prize: "Test",
    duration: 10000,
    winnersCount: 1,
    rolesToParticipate: ["roleId"]
});

Giveaway Edit

giveaway.edit(messageId, {prize: "Test v2", duration: 5000, winnersCount: 5});

Giveaway Delete

giveaway.delete(messageId);

⚙️ We did not say full configuration for nothing

{
  "createEmbed": {
    "title": "Giveaway",
    "description": ":tada: Raffle started prize ",
    "footer": "• {{winnersCount}} Winners"
  },
  "countdownEmbed": {
    "title": "Giveaway",
    "description": ":partying_face: Giveaway finish reaming time {{reaming}}.\n:gift: Prize: **{{prize}}**",
    "footer": "• {{winnersCount}} Winners"
  },
  "finishEmbed": {
    "title": ":tada: The draw is over",
    "description": ":partying_face: Giveaway end.\n:military_medal: Winners {{winners}} won.\n:gift: Prize: **{{prize}}**",
    "footer": ""
  },
  "winner": ":military_medal: Winners {{winners}} won.\n\n:gift: Prize: {{prize}}",
  "noWinner": ":military_medal: Giveaway there was no winner.",
  "controllers": {
    "noRole": "You need {{roles}} roles to participate in the lottery."
  }
}

djs-giveaway's People

Contributors

aliosmannn avatar

Stargazers

Özgür Öztürk avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.