Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
/ Messer Public archive
forked from mjkaufer/Messer

💬 Command-line messaging for Facebook Messenger

Notifications You must be signed in to change notification settings

Jasonnor/Messer

 
 

Repository files navigation

Messer

Command-line Messaging for Facebook Messenger

Downloads Version License

Installation

npm install -g messer

Quick Start

  1. Install messer
  2. Run messer
    $ messer
  3. Enter your details
  4. ...
  5. Profit

For a list of commands, jump to the Commands Reference

Setup

2-Factor Authentication

  1. Start Messer and wait for "Enter Code" prompt

  2. Enter a 2FA code generated from your 2FA app

    If at this point the login fails, go to Facebook and check for an "Unrecognised browser" notification

  3. Approve the browser/device (i.e. approve Messer)

  4. Retry from Step 1

After you've successfully logged in, an appstate.json file is created which should allow you to skip this process every time you log in. If you wish to "start over", just delete that file.

This should™ work! Please let us know if it doesn't: we've had a number of issues with it in the past.

Commands Reference

message

Sends a message to a given user

(message | m) "<user>" <message>

Examples

  • message "Matthew" hello world!
  • m "Matthew" hello world!

When sending a message, Messer picks the closest match to what you type in as user. For this reason, you should probably use last names if you want to avoid accidentally texting someone.

reply

Replys to the last message you recevied i.e. Sends a message to the user of the most recently received message.

(reply | r) <message>

Example

  • r "hey yo this is my reply"

Note: this will only work if you have received at least one message through Messer.

contacts

Lists all of your Facebook friends

contacts

history

Displays the last n messages in the conversation with a given user. The number of messages to retrieve are optional (default is 5).

(history | h] "<user>" [<numMessages>]

Examples

  • history "Matthew" 10
  • h "Matthew"

recent

Displays the n most recent conversations. The number of threads is optional (default is 5).

recent [<numThreads>]

Examples

  • history "Matthew" 10
  • h "Matthew"

clear

Clears the number of unread messages in the window title. Since we cannot listen on focus events, it has to be done manually.

(clear | c)

logout

Logs you out

logout

Non-interactive Mode

Messer can be run in non-interactive mode with command line arguments to execute a single command.

messer --command='[command]'

Login will be prompted if this is the first time logging in.

Examples

  • messer --command='m "John Smith" Hey, John'
  • messer --command='r Hey, John'

FAQ

Group Chats

Messages from group chats appear like

(My cool friends) John Smith - hey guys!!$$@@

Send a message to a group by using the message command. The name is the name of the group chat! Reply works as normal

Contributing

Take a look in Issues for things to contribute to. Only PR's that reference an issue will be considered. If you have a feature idea, submit an issue so it can be discussed!

Before you submit your PR, ask yourself...

  1. Does this PR resolve a particular issue? (if not, then why is this PR necessary)?

  2. Have I written tests? (where appropriate)

  3. Have I made sure the tests pass?

npm test

About

💬 Command-line messaging for Facebook Messenger

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%