respect mixed case commands
This commit is contained in:
parent
15b386237c
commit
d206c2d736
@ -4038,6 +4038,7 @@ func (t *Toki) fix(msg string) (string, string) {
|
|||||||
// RespondText to hi events
|
// RespondText to hi events
|
||||||
func (t *Toki) RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, post string) {
|
func (t *Toki) RespondText(c *gomatrix.Client, ev *gomatrix.Event, user, post string) {
|
||||||
cmd, w := t.fix(post)
|
cmd, w := t.fix(post)
|
||||||
|
cmd = strings.ToLower(cmd)
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "toki":
|
case "toki":
|
||||||
if word, ok := TokiLang[w]; ok {
|
if word, ok := TokiLang[w]; ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user