coding-buddies-discord / cb-bots

4 stars 3 forks source link

Cub/new_features #36

Closed cubiquitous closed 2 years ago

cubiquitous commented 2 years ago

This PR adds 4 things:

1 - new !points where is sent a image instead of a message; 2 - new way to send points. in this new way the bot will react to the message instead of sending a message; 3 - new !timezone command and an util to find flag commands; 4 - some small fixes of bugs or improvements that could be made;

regarding 1, there's a 2 functions, imgFromHtmlGenerator and generateBody. the first one receives the html that will be converted to the image. the generateBody receives two arguments, the html and the css (the string not the files) and generates a string with the completed html.

about 2, I changed the functions to accept the "silent mode" by default, but this could be easily changed, is not a big deal for me. if the silent mode is default, the user will need to pass --n at the end of the message (for noisy mode), but perhaps --m will be better (for message);

that's it, hope y'all like

cubiquitous commented 2 years ago

this was the last one. i'm gonna ask you to check if I missed try/catch in some places. I feel like there's a loop of await and no enough try/catch.

waream2 commented 2 years ago

@Claudi0-V you fucking rock dude thank you!🎉