Open inxec opened 4 years ago
how do I make this command? I really need it
how do I implement this on my code, I want my giveaways need role requirements
You can just copy it in you index/bot.js file after the manager part or you can create an extra file for it
I add that in my index.js, but it says cannot read property 'members' of undefined
oh nvm it works now, but any idea how to implement that into roles?
I tried this and works but, I kept getting error, cannot read property "guild" of null
but actually the command is works
Better use client.guilds.cache.get(giveaway.guildID) instead of giveaway.message.guild because .message can be null as your error confirms
cannot read property "roles" of undefined, I use client.guilds.cache.get(giveaway.guildID).roles.cache.get(${roleRequrement}
).members.filter(u => !u.bot).has(member.id)
We have added an example for role requirement in the discord-giveaways
docs in the giveawayReactionAdded
event, if you still need this info
Maybe it gets added to the bot itself somewhen
And btw I do not recommend using guild requirement anymore because Discord changed its mood and says that it is a kind of advertising and should not get used anymore.
This feature is really cool, especially cuz a lot of people want to have a bot something like Santa Wumpus, or Prism, which both has these feature and much more. Hope you can make this true, its alright if not, its just a suggestion ❤