availability of .latex command
3ddP opened this issue · 7 comments
Description
A user asked in PyGen if it would be possible to enable the .latex command in the help threads. After discussing it with Stelercus, we were wondering if it would be possible to either enable the .latex command everywhere except PyGen, or at least in the help threads.
Reasoning
It can be helpful to nicely typeset some maths when asking and answering questions.
Proposed Implementation
The .latex command here https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/fun/latex.py#L106-L134 has a whitelist called LATEX_ALLOWED_CHANNELS which could be extended/modified depending on where we want to allow the command.
Would you like to implement this yourself?
- [ ] I'd like to implement this feature myself
- Anyone can implement this feature
This sounds fine to me, we can always restrict it again if there's an issue.
I could help with this issue. I'd just need clarification on the finalized approach:
- Allow in all channels except X,Y,Z.
- Add X,Y,Z to the
LATEX_ALLOWED_CHANNELS
.
I could help with this issue. I'd just need clarification on the finalized approach:
- Allow in all channels except X,Y,Z.
- Add X,Y,Z to the
LATEX_ALLOWED_CHANNELS
.
Its the reverse, you add the the channels which are allowed in LATEX_ALLOWED_CHANNELS
. So if channel XYZ isn't allowed you don't add it to the LATEX_ALLOWED_CHANNELS
. Only allowed channels are to be added to that variable.
@matiaslagoevia I can assign you if you want to work on this.
The change should be as simple as adding the python help-channel id to the list of allowed channels, just like in the snippet attached to the issue
@matiaslagoevia I can assign you if you want to work on this.
The change should be as simple as adding the python help-channel id to the list of allowed channels, just like in the snippet attached to the issue
Thanks! I wasn't sure since the OP mentioned two different approaches in the description.
I'd be inclined to add it here, instead of here.
Also, I'm not sure what channel in the list here would be the appropriate one (or if I should add it to that list as well).
It should go into the LATEX_ALLOWED_CHANNNELS
, since we're talking about allowing the latex command, that'll automatically include it in the override later on.
The help channel isn't in the Channels
class, so you would need to add it as well.
Got it, I have enough context to tackle the issue now. Thank you!