From 1dd94410fd15e977e4625e6e5398578a6064a65e Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Fri, 25 Dec 2020 17:54:33 +0100 Subject: [PATCH] doc: add bin/ scripts usage --- doc/2_usage.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/doc/2_usage.md b/doc/2_usage.md index 80cda13..71ad2bf 100644 --- a/doc/2_usage.md +++ b/doc/2_usage.md @@ -85,22 +85,45 @@ Start or Stop your Bot use the following commands: ./bashbot.sh stop ``` -### User stats +### Scripts in bin/ To count the total number of users and messages run the following command: +```bash +bin/bashbot_stats.sh ``` -./bashbot.sh stats -``` - -### Sending broadcasts to all users To send a broadcast to all of users that ever used the bot run the following command: +```bash +bin/send_broadcast.sh "Hey, I just wanted to let you know that the bot's been updated!" + +Sending broadcast message to all users of Deal_O_Mat_bot +DRY RUN! use --doit as first argument to execute broadcast... +... +Message "Hey, ..." sent to xxx users. ``` -./bashbot.sh broadcast "Hey! I just wanted to let you know that the bot's been updated!" + +To send a message to one user or chat run the following command: + +```bash +bin/send_message.sh "CHAT[ID]" "Hey, I just wanted to let you know that the bot's been updated!" + +["OK"] "true" +["ID"] "12345" ``` +To replace a message already sent to one user or chat run the following command: + +```bash +bin/send_edit_message.sh "CHAT[ID]" "12345" "Done!" + +["OK"] "true" +["ID"] "12345" +``` + +Note: to get help about a script in bin/ run `scriptname.sh --help` + ---- ## Receive data