Skip to content

delaymessage#162

Open
kudelek wants to merge 3 commits intomjkaufer:masterfrom
kudelek:delaymessage
Open

delaymessage#162
kudelek wants to merge 3 commits intomjkaufer:masterfrom
kudelek:delaymessage

Conversation

@kudelek
Copy link
Copy Markdown

@kudelek kudelek commented Aug 23, 2020

Added delaymessage command, to delay a message by a certain number of minutes

kudelek and others added 3 commits May 28, 2020 12:51
Added delaymessage command
stop command in development
@@ -0,0 +1,22 @@
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kudelek are these changes relevant? Let's delete them if not :)

setTimeout(action, minDelay);
}

function action() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we import the message.js command and reuse its handler function here instead?

} else {
//return getThreadByName(messer.messen, rawReceiver)
//.then(thread =>
console.log(
Copy link
Copy Markdown
Collaborator

@tomquirk tomquirk Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we're leveraging the Node.js repl, we should instead return the resolve function like so:

return resolve(`Message will send in ${rawDelay} minutes`);

Comment thread src/messer/index.js

if (!argv || !argv[1]) {
return Promise.reject(Error("Invalid command - check your syntax"));
return Promise.reject(Error("Invalid command - check your syntax0"));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to change this?

Comment thread package.json
"test": "NODE_ENV=test && npm run lint && npm run test-unit"
},
"dependencies": {
"@types/minimist": "file:minimist",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to have this?

@tomquirk
Copy link
Copy Markdown
Collaborator

Hey @kudelek this is such an awesome addition! Thanks for working on it. I've left some comments for your consideration, let me know when you'd like me to take another look 🏓

@kudelek
Copy link
Copy Markdown
Author

kudelek commented Apr 23, 2021

Hey @tomquirk! Sorry for such late response. Thank you for your review of my addition. To be honest, I didn't expect my addition to be considered. I was just curious if it could be possible to delay messages on messenger, so i tried it here :) . I'll reply to your previous comments soon.

PS, I planned to extend this delaymessage option i.e. to be canceled. Maybe I'll do it in the future

@kudelek
Copy link
Copy Markdown
Author

kudelek commented Apr 24, 2021

I've tried to check some changes, but now I'm unable to log in with messer. I'll do it once I solve the problem on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants