Cog-Creators / Red-DiscordBot

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

Aliases can be used anywhere #283

Closed franc-ist closed 8 years ago

franc-ist commented 8 years ago

If a channel is ignored, an alias can still be used by non-mods.

tekulvw commented 8 years ago

Discord.py issue, I've tried numerous times to get Danny to fix this

Twentysix26 commented 8 years ago

About what aliases are we talking about? alias.py ones? How is this a discord.py issue?

tekulvw commented 8 years ago

Yeah, alias.py, customcom, and emotes all suffer from this. Within discordpy there is no way to stop it from dispatching on_message events which is what those three operate on

Twentysix26 commented 8 years ago

I see this as a non-issue. https://github.com/Twentysix26/Red-DiscordBot/blob/77bed58c455dd0565ec44654c890e01fc4e98d11/red.py#L71 This is how we ignore channels, servers and users for every other command, what's keeping us from doing the same in alias.py?

tekulvw commented 8 years ago

Because it shouldn't be up to cogs to respect ignores, if you do then issues like this happen.

Twentysix26 commented 8 years ago

I get what you mean but it's just how the command extension is designed. It makes sense for it to work as it does now. As I see it, there's really nothing for the author to "fix", it's working as intended.

Back to the original issue, it will be trivial to add the checks in alias. Already done the same in custom commands.

Twentysix26 commented 8 years ago

https://github.com/Twentysix26/Red-DiscordBot/commit/65c7cdb8eefd45a95df94244469e1e7dd9d14b1f