discord-giveaways | π Complete framework to facilitate the creation of giveaways using discordjs | Chat library
kandi X-RAY | discord-giveaways Summary
kandi X-RAY | discord-giveaways Summary
Discord Giveaways is a powerful Node.js module that allows you to easily create giveaways!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of discord-giveaways
discord-giveaways Key Features
discord-giveaways Examples and Code Snippets
Community Discussions
Trending Discussions on discord-giveaways
QUESTION
so I have this lockdown command I just made, but when I want to start the bot I get the following error
...ANSWER
Answered 2022-Feb-24 at 00:02The error you are getting (.options[1].type is required
) is a very big hint as to what the issue is. Searching the code of your files, I saw this in your third file in options[1]
:
QUESTION
I'm using the Discord Giveaways module.
I would like to know how to DM the host of the giveaway when their giveaway ended. I don't quite know how to do it yet.
This is what I know:
...ANSWER
Answered 2021-Feb-04 at 10:32It seems that you receive a giveaway
object when the giveawayEnded
is fired. If it has a prize
property, I'm pretty sure it also has a hostedBy
property.
hostedBy
is a "mention string" (e.g. <@335657562220537971>
), you can get the user's ID from it using .slice
, then fetch the user. Once you've fetched them, you can simply DM them:
QUESTION
So because the the command first only worked when i put every option in 1 message ".sg #bot-test 1m 1 Test", that worked with args, but now i am trying to let the bot await the options from the user like you will see in the screenshot, but when it comes to the duration he gives me the error: UnhandledPromiseRejectionWarning: Error: val is not a non-empty string or a valid number. val={"channelID":"702608643329228821","deleted":false,"id":"710388381846077511","type":"DEFAULT","content":"2d","authorID":"391243477058584588","pinned":false,"tts":false,"nonce":"710388377081348096","system":false,"embeds":[],"attachments":[],"createdTimestamp":1589440188610,"editedTimestamp":null,"webhookID":null,"applicationID":null,"activity":null,"flags":0,"reference":null,"guildID":"672002616372363274","cleanContent":"2d"}
I would not know what i should change, https://www.npmjs.com/package/discord-giveaways, if you want to see how the package "works".
The part of my code:
...ANSWER
Answered 2020-May-26 at 07:34The error only was because I forgot to add .content
so it should be if(!giveawayDuration || isNaN(ms(giveawayDuration.content))){
QUESTION
So i am using the package "discord-giveaways" and i want to use the "exemptMembers" option which is a function and with which i can set who is not allowed to take part in a giveaway and i want that people who haven't joined a specific server cannot take part but i am not sure if coded that right and also there is the error: TypeError: Cannot read property 'members' of undefined
that i don't really know to fix, so it would be nice if someone can say me what i did wrong.
ANSWER
Answered 2020-May-19 at 09:26The issue is that start-giveaway.js
file will not return any server id when you require it in the first code sample you gave. So let guild = client.guilds.cache.get(server)
will always be undefined
.
By looking at discord-giveaways documentation you can find out that in the options to start a giveaway you can define the exemptMembers
property again, so this is what you should do :
Firstly, remove the exemptMembers
property from the GiveawaysManager.
Then, modify start-giveaway.js
file like below.
exemptMembers
property might not work properly right now, an issue is currently opened in the discord-giveaway GitHub about it!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install discord-giveaways
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page