mirror of
https://github.com/lyx0/nourybot-matrix.git
synced 2024-11-13 19:49:54 +01:00
fix some command error messages
This commit is contained in:
parent
b60fcd51a3
commit
f7c92055d1
1 changed files with 5 additions and 5 deletions
|
@ -35,7 +35,7 @@ func (app *Application) ParseCommand(evt *event.Event) {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if resp, err := commands.Currency(cmdParams[1], cmdParams[2], cmdParams[4]); err != nil {
|
if resp, err := commands.Currency(cmdParams[1], cmdParams[2], cmdParams[4]); err != nil {
|
||||||
app.Log.Error().Err(err).Msg("Failed to handle Xkcd command")
|
app.Log.Error().Err(err).Msg("failed to handle currency command")
|
||||||
app.SendText(evt, "Something went wrong.")
|
app.SendText(evt, "Something went wrong.")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -46,7 +46,7 @@ func (app *Application) ParseCommand(evt *event.Event) {
|
||||||
|
|
||||||
case "ping":
|
case "ping":
|
||||||
if resp, err := commands.Ping(); err != nil {
|
if resp, err := commands.Ping(); err != nil {
|
||||||
app.Log.Error().Err(err).Msg("Failed to handle Ping command")
|
app.Log.Error().Err(err).Msg("failed to handle ping command")
|
||||||
app.SendText(evt, "Something went wrong.")
|
app.SendText(evt, "Something went wrong.")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,7 +57,7 @@ func (app *Application) ParseCommand(evt *event.Event) {
|
||||||
case "random":
|
case "random":
|
||||||
if msgLen == 2 && cmdParams[1] == "xkcd" {
|
if msgLen == 2 && cmdParams[1] == "xkcd" {
|
||||||
if resp, err := commands.RandomXkcd(); err != nil {
|
if resp, err := commands.RandomXkcd(); err != nil {
|
||||||
app.Log.Error().Err(err).Msg("Failed to handle Xkcd command")
|
app.Log.Error().Err(err).Msg("failed to handle random->xkcd command")
|
||||||
app.SendText(evt, "Something went wrong.")
|
app.SendText(evt, "Something went wrong.")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -69,7 +69,7 @@ func (app *Application) ParseCommand(evt *event.Event) {
|
||||||
case "xkcd":
|
case "xkcd":
|
||||||
if msgLen == 2 && cmdParams[1] == "random" {
|
if msgLen == 2 && cmdParams[1] == "random" {
|
||||||
if resp, err := commands.RandomXkcd(); err != nil {
|
if resp, err := commands.RandomXkcd(); err != nil {
|
||||||
app.Log.Error().Err(err).Msg("Failed to handle Xkcd command")
|
app.Log.Error().Err(err).Msg("failed to handle xkcd->randomXkcd command")
|
||||||
app.SendText(evt, "Something went wrong.")
|
app.SendText(evt, "Something went wrong.")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -78,7 +78,7 @@ func (app *Application) ParseCommand(evt *event.Event) {
|
||||||
}
|
}
|
||||||
} else if msgLen == 1 {
|
} else if msgLen == 1 {
|
||||||
if resp, err := commands.Xkcd(); err != nil {
|
if resp, err := commands.Xkcd(); err != nil {
|
||||||
app.Log.Error().Err(err).Msg("Failed to handle Xkcd command")
|
app.Log.Error().Err(err).Msg("failed to handle xkcd command")
|
||||||
app.SendText(evt, "Something went wrong.")
|
app.SendText(evt, "Something went wrong.")
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue