Git Product home page Git Product logo

acm_bot's Introduction

ACM Bot

Configuración previa

Hazte con un token hablando a @BotFather en Telegram.

Crea un archivo llamado bot.token que contenga únicamente el token, por ejemplo así:

echo "increible_token_que_no_voy_a_subir_a_github" > bot.token

Configuración opcional

Añade un pdf para los precios modificando en el Makefile la linea:

run: export PRICES_PATH = "path/to/file"

y en caso de que uses systemd:

srun: export PRICES_PATH = "path/to/file"

Ejecución

Ejecuta el bot con:

make run

Este comando descargará las dependencias necesarias, las compilará, compilará el proyecto y lo ejecutará. Puedes echarle un vistazo al Makefile que encontrarás en la raíz del proyecto.

Subir código

Crear una issue

Hay unos templates para las issues, intenta rellenar el máximo número de puntos a tratar posible.

Crear una rama relacionada con la issue

El nombre de la rama tendrá el siguiente formato:

<github_user>/issue_<issue_number>

Por ejemplo:

ironjanowar/issue_1

Crear una Pull Request relacionada a la issue

En esta PR se mencionará la issue y se seleccionará a alguien para que la revise y la pruebe.

Aprobación de PR

La PR una vez aprobada se mergeará a la rama develop.

Merge a master

Todavia por definir… ¯\_(ツ)_/¯

acm_bot's People

Contributors

ironjanowar avatar alfedi avatar

Stargazers

 avatar Ignacio Ballesteros avatar  avatar  avatar Rock Neurotiko avatar

Watchers

Guillermo Ramos avatar James Cloos avatar Daniel S. McCain avatar Rock Neurotiko avatar Luigy0x18 avatar Ashida avatar Ignacio Ballesteros avatar Samuel García avatar  avatar Javier Antonio Román López avatar Víctor Villar avatar  avatar

acm_bot's Issues

Avoid group chat flood

Is your feature request related to a problem? Please describe.
The bot is meant to be on the ACM main group. Since there are a lot of people there everybody could be spamming bot commands and in general it could be a problem.

Describe the solution you'd like
For large commands such as /junta or even /armario command, the bot could send a message with an inline button that redirects to the private chat with the bot and sends you the command information.

Describe alternatives you've considered
None.

Additional context
None.

/junta command

Is your feature request related to a problem? Please describe.
Someone may need to talk to someone of the ACM board and he/she will have to ask in the general chat and dodge some trolls.

Describe the solution you'd like
It would be useful to have a /junta command that shows the aliases (and the roles) of ACM UPM board, in case someone wants to ask something.

Describe alternatives you've considered
None.

Additional context
Thanks to @AshidaSRS for the idea..

Discourse command(s)

Is your feature request related to a problem? Please describe.
If discourse.acmupm.es will be operative again we are going to need a mechanism to send notifications to everyone about new post, messages...

Describe the solution you'd like
I was thinking about a very basic notification system that sends a message everytime a post or a response is made. The bot could send a message to the principal group with an URL of the post and with mentions of all the people involved. Everything can be made using the discourse API.

Describe alternatives you've considered
@ignaciobll suggest that the bot should open a private chat with the people involved in the discourse post, but that's something above my knowledge.

Additional context
None.

Enhance the /armario command

The problem
The bot sends the same document every time you ask for it.

Suggestion
Use an application env variable to store (in execution) the file id sent with ExGram.send_document( ... )

Integración con Discourse

Debería tener un nuevo comando que se encargara de avisar por el chat general cuando alguien escribe en el Discourse para así no tener que estar pendiente de los nuevos avisos del discourse todo el rato.

/eventos command

El bot debería tener un comando para señalar cual sería la próxima actividad de ACM.

Precios de los productos del armario

Is your feature request related to a problem? Please describe.
Para no tener que preguntar a nadie o tener que ir al armario a ver los precios, el bot puede los precios de lo que hay en el armario.

Describe the solution you'd like
Lo ideal sería implementar la posibilidad de ver los precios de manera inline, de tal manera que escribiendo @acmupm_bot galletas, se hiciera una búsqueda entre los productos y mostrar una pequeña lista con los mejores resultados de esa búsqueda.

La lista podría tener un formato tipo:

producto1   0.60€
producto2   1.20€
producto3   0.40€

Además se podrá clicar en cualquiera de ellos para compartir esa información.

Si además se quiere toda la lista al poner @acmupm_bot sin ningúna búsqueda saldrán las opciones:

Productos del armario

Al clicar en esta opción se mostrará en el chat la lista completa de los precios.

Describe alternatives you've considered
De momento solo se me ha ocurrido esto.

Additional context
Para esto estaría bien tener una base de datos para que sea mucho más sencilla la implementación. Si actualmente se guardan los precios en un excel se podría exportar a csv e introducirlos en una base de datos que consuma el bot.

Esto se puede automatizar mediante scripts también e incluso se puede añadir un comando de administrador en el bot para hacer ese volcado, aunque esto recomiendo que se plantee una vez esté implementado esta funcionalidad.

Comando del armario

El bot debería tener un comando que te mande la lista de precios del armario.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.