Closed JKohlman closed 3 years ago
Hey @JKohlman, thanks for this feature request. While I do believe that the request is a good and valid addition to Translate
, I will be closing this as I ask potential contributors to discuss anything with me on Discord first before a PR (see the Contributing section of README.md), and for something new like this it would be preferred for an issue to be opened first and foremost. In the future, please be sure to do the above, and feel free to contact me on Discord if you have any questions. For this message idea, I have considered it before but did not have much need for it myself, but I will be implementing this as another command (along with more possible improvements) once my fixes on dev
have been confirmed and pushed to main
.
This has been added in 0617313f2c3d4e64d9273931d1899c0d9fba3429
Instead of having to copy/paste a message it would be very nice to specify a message to translate. I saw your plan of potential reaction-based translations and I think that would be a good idea but until that is complete there's not a great solution so I figured I'd make a solution in the meantime.
This code very simply adds a secondary syntax to
[p]translate
- if themessage
parameter passed is a valid message ID from the same channel then it changes the target of the translation to the contents of the referenced message.Example:
this is a test message
and that message has ID 1234.[p]translate French 1234
.this is a test message
->Ceci est un message test
In the event of an error at any step this falls back on the default behavior.
I wasn't sure whether to do this like I did or whether a subcommand would be more appropriate. I'd love to hear feedback so I can adjust and prep for review/merging.