Cog-Creators / Red-DiscordBot

A multi-function Discord bot
https://docs.discord.red
GNU General Public License v3.0
4.69k stars 2.3k forks source link

Ask for confirmation when path passed to addpath seems incorrect #6330

Closed Jackenmen closed 5 months ago

Jackenmen commented 5 months ago

Description of the changes

This is one of the most common issues encountered by beginner cog creators trying to use [p]addpath, let's try to nudge them in the right direction!

Suggestions on the message's content welcome, the distance between the question and the buttons doesn't sit right with me but I wasn't sure how to address this. Would it make sense to repeat the question?

Have the changes in this PR been tested?

Yes

yamikaitou commented 5 months ago

What about adding on to this to make sure the path isn't within the Data or Install paths?

Jackenmen commented 5 months ago

What about adding on to this to make sure the path isn't within the Data or Install paths?

Good idea, I disallowed anything under data and core paths completely (the install path is part of the data path).