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

Stop bot from adding participant role to itself #250

Closed
SylteA opened this issue Nov 6, 2023 · 9 comments · Fixed by #251
Closed

Stop bot from adding participant role to itself #250

SylteA opened this issue Nov 6, 2023 · 9 comments · Fixed by #251
Assignees
Labels
good first issue Good for newcomers

Comments

@SylteA
Copy link
Owner

SylteA commented Nov 6, 2023

image
@SylteA SylteA added the good first issue Good for newcomers label Nov 6, 2023
@FelpyOfGulet
Copy link
Contributor

Hi! This would be my first issue, so I'm a little unfamiliar with the procedures.
When does the bug happen? I noticed that in the "roles.py" file, the code doesn't check if the user is the bot, but I'm not sure how to test this!

@SylteA
Copy link
Owner Author

SylteA commented Nov 6, 2023

Hi, I'll assign this issue to you.
This role is added by the challenges extension in the events.py file, let me know if you need more information!

@FelpyOfGulet
Copy link
Contributor

I see! I've made a commit where I added checks to on_tag_create, on_tag_edit and on_tag_delete to tell if the user is the bot. As mentioned, I'm unfamiliar with how to test the discord library, but I'm looking forward to your feedback :)

@FirePlank
Copy link
Contributor

Hi, you need to create a pull request on this repository for us to be able to review and merge your changes. Thanks.

@SylteA
Copy link
Owner Author

SylteA commented Nov 6, 2023

I'm not sure why you are editing those events, they are irrelevant to this issue.

To test you'll need to set up and run the bot. You can join our discord and talk to our other collaborators, they'll help with getting you set up. https://discord.gg/twt

@FelpyOfGulet
Copy link
Contributor

Hi, you need to create a pull request on this repository for us to be able to review and merge your changes. Thanks.

Ok, but it looks like I've made a mistake with the last variable. How can I edit the commit first?

I'm not sure why you are editing those events, they are irrelevant to this issue.

I see :/
I believe I might have gotten the wrong events.py file in that case. Should I have edited bot/extensions/persistent_roles/events.py instead?

@SylteA
Copy link
Owner Author

SylteA commented Nov 6, 2023

Hi, I'll assign this issue to you. This role is added by the challenges extension in the events.py file, let me know if you need more information!

See my comment here for the correct file.

@FirePlank
Copy link
Contributor

Ok, but it looks like I've made a mistake with the last variable. How can I edit the commit first?

You can fix any mistakes you make in a new commit, when you create a pull request, any new commits you make will automatically be added to it.

@FelpyOfGulet
Copy link
Contributor

I've made a pull request! There is a small mistake that I noticed afterwards, and I'm still not quite clear how to amend it (there is a lone "if" statement. Otherwise, please let me know if it's not correct.

@SylteA SylteA linked a pull request Nov 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants