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

added code to line #643 for the tolower commands #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rootloopz
Copy link

i also tried implementing it in line #665 but to no avail, any ideas?

@Ramsfield
Copy link
Collaborator

Here's a thought, how about we create a new function -- a helper function that will return us a lowercase dictionary of all the options available to us:

def brole_dict(ctx): #Our entry will need the context to get the roles to send back to the user
    roles = ctx.guild.roels # Get the roles
    broles = {i.name.lower():i for i in roles} # will give you a dictionary where all of the keys are the lowercase roles. This way we can just say add_roles(broles["rolename"]) and be solid
    return broles # Work complete!

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

Successfully merging this pull request may close these issues.

2 participants