@@ -111,6 +111,72 @@ DENTISTRY SYMBOL LIGHT VERTICAL AND BOTTOM LEFT
111
111
112
112
` + "`" + `auto-emote` + "`" + ` comments to discord and reacts to all messages with vaguely related emoji.
113
113
114
+ The following env vars should be set:
115
+
116
+ * LM_DROPBOX_TOKEN should be set to load a responses.json.
117
+ * LM_BOT_LUA_PATH should be set to the location of lua to process emoji data within dropbox.
118
+ * LM_DISCORD_TOKEN should be set for this to actually function.
119
+
120
+ Here's an example of lua code that works for this:
121
+
122
+ if es:messagematches("cronos") then
123
+ es:addrequired("👶")
124
+ es:addrequired("🥘")
125
+ end
126
+
127
+ The lua code has a global var called ` + "`" + `es` + "`" + ` (for emoji set) and an imported
128
+ package called ` + "`" + `turtleemoji` + "`" + `. ` + "`" + `es` + "`" + ` is how you access the current message,
129
+ currently added emoji, etc. Here are the methods on ` + "`" + `es` + "`" + `:
130
+
131
+ #### ` + "`" + `es:addoptional("💀")` + "`" + `
132
+
133
+ Adds an emoji to randomly include in the reaction.
134
+
135
+ #### ` + "`" + `es:hasoptional("💀") // bool` + "`" + `
136
+
137
+ Returns true of the passed emoji is in the list of optional emoji to include
138
+ (at random) on the reaction.
139
+
140
+ #### ` + "`" + `es:removeoptional("💀")` + "`" + `
141
+
142
+ Remove the passed emoji from the optionally included emoji.
143
+
144
+ #### ` + "`" + `es:hasrequired("💀")` + "`" + ` // bool
145
+
146
+ Returns true if the passed emoji is going to be included in the reaction.
147
+
148
+ #### ` + "`" + `es:addrequired("💀")` + "`" + `
149
+
150
+ Add an emoji to the reaction.
151
+
152
+ #### ` + "`" + `es:removerequired("💀")` + "`" + `
153
+
154
+ Remove an emoji that is going to be included in the reaction.
155
+
156
+ #### ` + "`" + `es:message()` + "`" + ` // string
157
+
158
+ Returns the message that triggered the reaction.
159
+
160
+ #### ` + "`" + `es:messagematches("regexp")` + "`" + ` // bool
161
+
162
+ True if the message matches the passed regex.
163
+ [Docs for regex syntax are here](https://golang.org/pkg/regexp/syntax/).
164
+
165
+ #### ` + "`" + `es:hasword("word")` + "`" + ` // bool
166
+
167
+ True if the word is included in the message. Tokenization of words happens on
168
+ all non-alpha characters and the message is lowerecased.
169
+
170
+ All of the following are thin veneers atop
171
+ [github.com/hackebrot/turtle](https://github.com/hackebrot/turtle):
172
+
173
+ * ` + "`" + `turtle.findbyname("skull")` + "`" + ` // turtleemoji
174
+ * ` + "`" + `turtle.findbychar("💀")` + "`" + ` // turtleemoji
175
+ * ` + "`" + `turtleemoji#name()` + "`" + ` // string
176
+ * ` + "`" + `turtleemoji#category()` + "`" + ` // string
177
+ * ` + "`" + `turtleemoji#char()` + "`" + ` // string
178
+ * ` + "`" + `turtleemoji#haskeyword("keyword")` + "`" + ` // bool
179
+
114
180
### ` + "`" + `backlight` + "`" + `
115
181
116
182
` + "`" + `backlight` + "`" + ` is a faster version of ` + "`" + `xbacklight` + "`" + ` by directly writing to ` + "`" + `/sys` + "`" + `. Example:
@@ -505,70 +571,70 @@ func init() {
505
571
506
572
"alluni" : readme [2642 :3468 ],
507
573
508
- "auto-emote" : readme [3468 :3575 ],
574
+ "auto-emote" : readme [3468 :5561 ],
509
575
510
- "backlight" : readme [3575 : 3777 ],
576
+ "backlight" : readme [5561 : 5763 ],
511
577
512
- "clocks" : readme [3777 : 3993 ],
578
+ "clocks" : readme [5763 : 5979 ],
513
579
514
- "csv2json" : readme [3993 : 4133 ],
580
+ "csv2json" : readme [5979 : 6119 ],
515
581
516
- "csv2md" : readme [4133 : 4207 ],
582
+ "csv2md" : readme [6119 : 6193 ],
517
583
518
- "debounce" : readme [4207 : 4551 ],
584
+ "debounce" : readme [6193 : 6537 ],
519
585
520
- "dump-mozlz4" : readme [4551 : 4734 ],
586
+ "dump-mozlz4" : readme [6537 : 6720 ],
521
587
522
- "email2json" : readme [4734 : 5449 ],
588
+ "email2json" : readme [6720 : 7435 ],
523
589
524
- "expand-url" : readme [5449 : 5625 ],
590
+ "expand-url" : readme [7435 : 7611 ],
525
591
526
- "export-bamboohr" : readme [5625 : 5709 ],
592
+ "export-bamboohr" : readme [7611 : 7695 ],
527
593
528
- "export-bamboohr-tree" : readme [5709 : 5796 ],
594
+ "export-bamboohr-tree" : readme [7695 : 7782 ],
529
595
530
- "fn" : readme [5796 : 5932 ],
596
+ "fn" : readme [7782 : 7918 ],
531
597
532
- "group-by-date" : readme [5932 : 6150 ],
598
+ "group-by-date" : readme [7918 : 8136 ],
533
599
534
- "minotaur" : readme [6150 : 7969 ],
600
+ "minotaur" : readme [8136 : 9955 ],
535
601
536
- "name2rune" : readme [7969 : 8074 ],
602
+ "name2rune" : readme [9955 : 10060 ],
537
603
538
- "netrc-password" : readme [8074 : 8239 ],
604
+ "netrc-password" : readme [10060 : 10225 ],
539
605
540
- "notes" : readme [8239 : 8375 ],
606
+ "notes" : readme [10225 : 10361 ],
541
607
542
- "pomotimer" : readme [8375 : 8867 ],
608
+ "pomotimer" : readme [10361 : 10853 ],
543
609
544
- "prepend-hist" : readme [8867 : 9108 ],
610
+ "prepend-hist" : readme [10853 : 11094 ],
545
611
546
- "proj" : readme [9108 : 10427 ],
612
+ "proj" : readme [11094 : 12413 ],
547
613
548
- "render-mail" : readme [10427 : 10561 ],
614
+ "render-mail" : readme [12413 : 12547 ],
549
615
550
- "replace-unzip" : readme [10561 : 10791 ],
616
+ "replace-unzip" : readme [12547 : 12777 ],
551
617
552
- "slack-deaddrop" : readme [10791 : 11011 ],
618
+ "slack-deaddrop" : readme [12777 : 12997 ],
553
619
554
- "slack-open" : readme [11011 : 11145 ],
620
+ "slack-open" : readme [12997 : 13131 ],
555
621
556
- "slack-status" : readme [11145 : 11290 ],
622
+ "slack-status" : readme [13131 : 13276 ],
557
623
558
- "sm-list" : readme [11290 : 11566 ],
624
+ "sm-list" : readme [13276 : 13552 ],
559
625
560
- "srv" : readme [11566 : 12049 ],
626
+ "srv" : readme [13552 : 14035 ],
561
627
562
- "status" : readme [12049 : 12506 ],
628
+ "status" : readme [14035 : 14492 ],
563
629
564
- "toml2json" : readme [12506 : 12681 ],
630
+ "toml2json" : readme [14492 : 14667 ],
565
631
566
- "uni" : readme [12681 : 12843 ],
632
+ "uni" : readme [14667 : 14829 ],
567
633
568
- "update" : readme [12843 : 13066 ],
634
+ "update" : readme [14829 : 15052 ],
569
635
570
- "yaml2json" : readme [13066 : 13143 ],
636
+ "yaml2json" : readme [15052 : 15129 ],
571
637
572
- "zine" : readme [13143 : 13199 ],
638
+ "zine" : readme [15129 : 15185 ],
573
639
}
574
640
}
0 commit comments