smogon / Porygon-Z

The Bot for the Official Smogon Discord (WIP)
https://discord.gg/smogon
MIT License
13 stars 6 forks source link

BaseCommand.getChannel - Option to ignore channels a user cannot access. #14

Closed HoeenCoder closed 4 years ago

HoeenCoder commented 4 years ago

The getChannel method on the BaseCommand class should have some kind of option to only return channels a specific user can see. Currently, the options are simply any channel the bot can access or only channels in the server (guild) that the command is being run in.

This change would require some kind of toggle able flag (that preferably defaults to false but im always open to discussion). The check needs to take both the user's permissions via role into account, as well as specific channel overrides into account.

Anyone is welcome to take this, I will handle it myself if nobody does.