halp
This commit is contained in:
parent
b058b84fb3
commit
25607a7333
20
bot.js
20
bot.js
@ -14,7 +14,7 @@ const memeGenerator = new memeLib({
|
||||
fontOptions: { // optional
|
||||
fontSize: 46,
|
||||
fontFamily: 'impact',
|
||||
lineHeight: 2
|
||||
lineHeight: 4
|
||||
}
|
||||
});
|
||||
|
||||
@ -35,10 +35,22 @@ bot.onText(/\/cuandoLaTesis/, (msg, match) => {
|
||||
// 'msg' is the received Message from Telegram
|
||||
// 'match' is the result of executing the regexp above on the text content
|
||||
// of the message
|
||||
});
|
||||
|
||||
bot.onText(/\/halp/, (msg, match) => {
|
||||
// 'msg' is the received Message from Telegram
|
||||
// 'match' is the result of executing the regexp above on the text content
|
||||
// of the message
|
||||
|
||||
bot.sendMessage(msg.chat.id,
|
||||
"Cómo usar este bot :) (Para simios)," +
|
||||
"/CuandoLaTesis commando en desarrollo," +
|
||||
"/CuandoElBorrador entrega cuanto te queda para escribir el borrador," +
|
||||
"/CuandoLaRevision entrega cuanto falta para que te entreguen tu revisión de la tesis," +
|
||||
"/termineLaTesisCTM [fecha] registra el día que das la charla II, la fecha es opcional (YYYY-MM-DD)," +
|
||||
"/entregueElBorrador [fecha] registra el día que entregaste el borrador, la fecha es opcional (YYYY-MM-DD)."
|
||||
).then(() => {});
|
||||
|
||||
console.log(msg.from.id);
|
||||
console.log(msg.chat.id);
|
||||
});
|
||||
|
||||
bot.onText(/\/cuandoLaRevision/, (msg, match) => {
|
||||
@ -78,7 +90,7 @@ bot.onText(/\/cuandoLaRevision/, (msg, match) => {
|
||||
} else {
|
||||
|
||||
const diffTime = Math.abs(now - date);
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
||||
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) - 1;
|
||||
const diffHrs = Math.floor((diffTime % 86400000) / 3600000); // hours
|
||||
const diffMinutes = Math.round(((diffTime % 86400000) % 3600000) / 60000); // minutes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user