Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Role Requirement, Guild Requirement #42

Open
inxec opened this issue Jun 15, 2020 · 9 comments
Open

[Suggestion] Role Requirement, Guild Requirement #42

inxec opened this issue Jun 15, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@inxec
Copy link

inxec commented Jun 15, 2020

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 ❤

@Androz2091 Androz2091 added the enhancement New feature or request label Jun 15, 2020
@DamaraNadhra
Copy link

how do I make this command?
I really need it

@DamaraNadhra
Copy link

image
how do I implement this on my code, I want my giveaways need role requirements

@Nico105
Copy link
Collaborator

Nico105 commented Sep 7, 2020

You can just copy it in you index/bot.js file after the manager part or you can create an extra file for it

@DamaraNadhra
Copy link

image
I add that in my index.js, but it says cannot read property 'members' of undefined

@DamaraNadhra
Copy link

oh nvm it works now, but any idea how to implement that into roles?

@DamaraNadhra
Copy link

image
I tried this and works but, I kept getting error, cannot read property "guild" of null
but actually the command is works

@Nico105
Copy link
Collaborator

Nico105 commented Sep 8, 2020

Better use client.guilds.cache.get(giveaway.guildID) instead of giveaway.message.guild because .message can be null as your error confirms

@DamaraNadhra
Copy link

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)

@Nico105
Copy link
Collaborator

Nico105 commented Jan 3, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants