phpmx / phpmxbot Goto Github PK
View Code? Open in Web Editor NEWA Slack bot for the PHP Mexico Community.
A Slack bot for the PHP Mexico Community.
Drop support for channels and everything else as this is a pretty unused feature of the old bot.
I used the email address on the Org as the contact info, but we need to double check that it is actually monitored by several people.
@dmouse can you confirm [email protected]
is the right email address for the code of conduct, or if not, provide the right one?
Add randomly selected messages when the bot notifies about ++ or -- changes.
++ messages:
'¡Felicidades!',
'¡Lo tienes!',
'Bravo.',
'Bien hecho.',
'¡Gran trabajo!',
'Exquisito.',
'Encantador.',
'Soberbio.',
'¡Clásico!',
'Notorio.',
'¡Bien, bien!',
'Bien jugado.',
'Mis más sinceras felicitaciones.',
'Delicioso.',
':nice:',
':nyan:',
':party'
-- messages:
'¿De verdad?',
'Oh :slightly_frowning_face:.',
'Ya veo.',
'Ouch.',
'Eso duele.',
'Oh.',
'Que mal.',
'Mis condolencias.',
'Suerte para la próxima',
':trollface:',
':sadpanda:'
Self messages (depends on #22)
'Hahahahahahaha no.',
'Nope.',
'No. Simplemente no.',
':facepalm:',
':wat:'
In order to get the points handler in the bot to a good state, I would like to have a list of all existing functionality on the existing PlusPlus bot so that we can decide if we want all of it, or if we want to deprecate certain pieces.
So far some bits and pieces have surfaced over discussions in Slack, but I do not have a comprehensive list.
As far as I know these are missing on the new points handler:
Am I missing others?
Instead of just adding or subtracting points to the leaderboard entries, we would also like to keep a history of changes in an independent table. This will allow us to extract some statistics on the points, historic trends, etc.
Once we have the changes log in place, we need to automatically (or via bot or slash command) reset the leaderboard after X time. This will allow new members to climb the score board as opposed to be nearly imposible pass oldest members.
Currently, index.php
has all the "routes" in it. To improve reusability and extensibility this should be done in route files that get loaded and initialized automatically (like plugins).
I believe someone mentioned that we could use the bot also to welcome new members that join the community. This can be done very easily by adding an event handler for workspace join, or simply by adding a channel join listener for #general (all members must be at the very least in this channel.
Some highlights that can be useful:
¡Que tal, equipo!
En el PR #34 se habla de una tabla de configuración en SQL para almacenar los diferentes mensajes de respuesta en la conversación de PlusPlus
, se sugiere una columna por cada tipo de mensaje en vez de tener una tabla dedicada para puros mensajes.
Suena genial, pero antes de crear esta tabla de configuraciones, me gustaría saber lo siguiente:
Me gustaría hacer algunas sugerencias dependiendo de las respuestas que se tengan.
Document Slack setup details in the Wiki so others can follow those steps. I'll add in a follow up comments my current setup (oauth scopes, etc.) so we can write a good documentation page.
When a user performs an action that adds or subtracts points, the bot will send a message to the channel where the change was originated.
To avoid spam in the channel, when other uses repeat the action via reactions, the bot should try to update its own message instead of adding multiple notifications.
Send a private welcome message to new users in Slack
Similar to what we have with plusplus today, we should have a web version of the leaderboard where we can see points, and maybe some other stats (monthly, yearly, all time).
Users must not be able to add points (++) to themselves, but they can remove points from themselves (--).
Positive reactions (👍🏻, 👏🏻, ✋🏻, 🙋🏻♂️, 🙋🏻♀️, 🙋🏻) ( ➕ )
If a user adds any of the positive reactions to a message with one or more point changes (++, --) the bot will repeat the action in the message as if the user adding the reaction had written the same message.
Negative reactions (👎🏻, 🙃) ( ➖ )
If a user adds any of the negative reactions to message with one or more point changes (++, --) the bot will repeat the action in the message as if the user adding the reaction had written the same message, BUT the points will be inverted (that is, all ++ become --, and -- become ++).
Inappropriate reactions (🖕🏻)
If a user adds any of the inappropriate reactions to a message, the user will be penalized with -100 points for inappropriate behavior.
Removing reactions
If a user decides to remove one of the above reactions, the bot must effectively undo the changes done when the reaction was added by the user (with the exception of the inappropriate reactions).
We need to have some basic unit test coverage at the very minimum.
I have no previous experience with any test framework on PHP, so any help is really appreciated!
I am happy to host the bot on my VPS while we figure out a proper place to host it and deploy it.
I would love to have a staging and prod setup. Also, at some point I would also want to have some testing in place.
Ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.