@ably/cli
Version:
Ably CLI for Pub/Sub, Chat and Spaces
19 lines (18 loc) • 913 B
JavaScript
import { Command } from "@oclif/core";
export default class MessagesIndex extends Command {
static description = "Commands for working with chat messages in rooms";
static examples = [
'$ ably rooms messages send my-room "Hello world!"',
"$ ably rooms messages subscribe my-room",
"$ ably rooms messages get my-room",
'$ ably rooms messages reactions add my-room "message-id" "👍"',
];
async run() {
this.log("Use one of the messages subcommands:");
this.log("");
this.log(" ably rooms messages send - Send a message to a chat room");
this.log(" ably rooms messages subscribe - Subscribe to messages in a chat room");
this.log(" ably rooms messages get - Get historical messages from a chat room");
this.log(" ably rooms messages reactions - Work with message reactions in a chat room");
}
}