commit 17769fb

Tim Culverhouse  ·  2023-07-14 20:47:31 +0000 UTC
parent 4210720
commands: add /tableflip command

Add a command to flip the table

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2 files changed,  +13, -1
+9, -0
 1@@ -208,6 +208,10 @@ func init() {
 2 			Desc:   "send a shrug to the current channel ¯\\_(ツ)_/¯",
 3 			Handle: commandDoShrug,
 4 		},
 5+		"TABLEFLIP": {
 6+			Desc:   "send a tableflip to the current channel (╯°□°)╯︵ ┻━┻",
 7+			Handle: commandDoTableFlip,
 8+		},
 9 	}
10 }
11 
12@@ -776,6 +780,11 @@ func commandDoShrug(app *App, args []string) (err error) {
13 	return commandSendMessage(app, buffer, `¯\_(ツ)_/¯`)
14 }
15 
16+func commandDoTableFlip(app *App, args []string) (err error) {
17+	_, buffer := app.win.CurrentBuffer()
18+	return commandSendMessage(app, buffer, `(╯°□°)╯︵ ┻━┻`)
19+}
20+
21 func (app *App) handleInput(buffer, content string) error {
22 	if content == "" {
23 		return nil
+4, -1
 1@@ -207,7 +207,10 @@ _name_ is matched case-insensitively.  It can be one of the following:
 2 	This opens a temporary list, which can be closed with the escape key.
 3 
 4 *SHRUG*
 5-	Send a shrug to the current channel. ¯\\\_(ツ)\_/¯
 6+	Send a shrug emoji to the current channel. ¯\\\_(ツ)\_/¯
 7+
 8+*TABLEFLIP*
 9+	Send a table flip emoji to the current channel. (╯°□°)╯︵ ┻━┻
10 
11 # SEE ALSO
12