Code for a small bot to manage giveaways.
you can manage giveaways with custom commands :
- setGiveway
id
summary
: create or update the giveaway member list - giveaway
id
: launch a giveaway roll - lastGiveaway
id
: recall the last winner for a giveaway - listSubscribers
id
: list the members subscribed to giveaway - listWinners
id
: list the winners subscribed to giveaway - listAttendees
id
: list the subscribers to giveaway that can win to the next giveaway
๐ Be careful : the id is unique, but if you mispelled it you will create another giveaway list.
- Create the new giveaway with a unique id
for example
/set-giveaway march-2024-treasure Win a fabulous prize
- launch a giveway with this id
for example
/giveaway march-2024-treasure
- Anyone can know anytime who is the last winner with the last-giveaway command
/last-giveaway march-2024-treasure
๐ฎ all commands should be available in your discord prompt once the bot is activated, appearing when you are typing a slash in your chat input.
You'll need :
- a PostgreSQL database.
- a NodeJs server, able to run services
- Populate your PG database with the dump found at /documentation/postgre.sql
- clone the repository
- Configure your Discord Developer App
- copy .env.example to .env, and fill all values
- declare a service on your service with the command
node <path>/src/index.js
- install the bot in your serveur integrations.