Kreusada / Kreusada-Cogs

Cogs for Red-DiscordBot
https://kreusadacogs.readthedocs.io/en/latest/
MIT License
30 stars 18 forks source link

[Captcha] Manually initiate a challenge for the specified user(s). #197

Closed AAA3A-AAA3A closed 2 years ago

AAA3A-AAA3A commented 2 years ago

Type

Description of the changes

Hello, Here is the code to add the functionality to manually launch the captcha challenge for the specified user(s). Simply issue the command "[p]captcha @user @user1 etc.". Thanks in advance and have a nice day.

Kreusada commented 2 years ago

Thanks for looking to contribute. As you can see, I've added the November milestone to your PR. This means I'll try and get onto it in the month of November, although I must take my exams first.

Kreusada commented 2 years ago

Please run pre-commit on the necessary files.

AAA3A-AAA3A commented 2 years ago

I have made all the changes you suggested. Should I use black on the files? Thanks you in advance.

Kreusada commented 2 years ago

Yes, please run black again on those changes

AAA3A-AAA3A commented 2 years ago

I just tested everything. Everything works and no errors on the console. Before using black on it, I test against a bot and a user at the same time.

AAA3A-AAA3A commented 2 years ago

I have another idea which I may do when I have finished my own cog in progress. It would be to allow another setting that would allow a server owner to challenge someone who "looks" like a bot without necessarily testing everyone at their entrance.

AAA3A-AAA3A commented 2 years ago

I reformatted the only file that had been modified using black and isort. It's fine.

AAA3A-AAA3A commented 2 years ago

I have changed my PR a lot. For the "[p]captcha" command, it will send an error message if the challenge already exists, rather than aborting everything. Then I added a "[p]skipcaptcha" command which, as the name suggests, will stop a captcha challenge for the specified user(s). I will make the PR change soon. What do you think of it?

AAA3A-AAA3A commented 2 years ago

Hello, I made all the requested changes, tested everything and ran isort and black on it. Everything is good. Any other modification ? Thanks in advance.

Kreusada commented 2 years ago

please run black on your recent changes

Kreusada commented 2 years ago

There's also undefined variables everywhere, I do not believe you have tested this. Please go away and test it properly

AAA3A-AAA3A commented 2 years ago

I had already spent black and isort on it. You can see that I have uploaded again. I really tested the commands and they work. I didn't go any further. I'll look at the undefined variables.

AAA3A-AAA3A commented 2 years ago

All undefined variables are corrected. That's all right. I ran black and isort on it.

Kreusada commented 2 years ago

Unfortunately I have come to the decision that I would not like to see this feature merged into master. With dpy2 on the horizon, I'd much rather focus on fundamental implementation than feature ideas. You may maintain your own fork so that you can continue using these new commands for your instance of Red. Thank you very much for your willingness to contribute, and for your time dedicated to this PR.