-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod Anonymous config option, Log Users Messages & Restrict amount of messages by Ticket #92
Conversation
alambertt
commented
Apr 16, 2022
•
edited
Loading
edited
- When a person of support staff answer a ticket this config shall allow to show or hide their name
- The bot log all the users messages by Ticket
- Added a parameter to Restrict the amount of messages by Ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I have made two short comments in your code.
Please address them first before merging.
src/staff.ts
Outdated
`${middleware.escapeText(message.text)}\n\n`+ | ||
`${cache.config.language.regards}\n`+ | ||
`${message.from.first_name}`; | ||
const first_name = !cache.config.mod_anonymous ? `${message.from.first_name}` : ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I initially meant is that you remove the new line only if the first name is not sent. So when you from.first_name
ist empty it does not add the new line at the end.
So please add something like this:
const first_name = !cache.config.mod_anonymous ? `${message.from.first_name}\n` : "";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine except the new line thing, thank you.
Please edit that again as I wrote in the comment ;)