refactor: rename cmds -> hostcmds
This commit is contained in:
parent
bd5e8112a1
commit
fbe9c3d004
6
bot.go
6
bot.go
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/go-errors/errors"
|
"github.com/go-errors/errors"
|
||||||
tele "gopkg.in/telebot.v3"
|
tele "gopkg.in/telebot.v3"
|
||||||
|
|
||||||
"git.gensokyo.cafe/kkyy/tgbot_misaka_5882f7/cmds"
|
"git.gensokyo.cafe/kkyy/tgbot_misaka_5882f7/hostcmds"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isFromAdmin(sender *tele.User) bool {
|
func isFromAdmin(sender *tele.User) bool {
|
||||||
|
@ -204,7 +204,7 @@ func handleDigCmd(c tele.Context) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
req, err := cmds.NewDigRequest(msg.Payload)
|
req, err := hostcmds.NewDigRequest(msg.Payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return c.Reply(
|
return c.Reply(
|
||||||
"Invalid arguments.\nUsage: `/dig <name> [type]`",
|
"Invalid arguments.\nUsage: `/dig <name> [type]`",
|
||||||
|
@ -213,7 +213,7 @@ func handleDigCmd(c tele.Context) error {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := cmds.Dig(req)
|
resp, err := hostcmds.Dig(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = c.Reply(stickerFromID(stickerPanic), tele.Silent)
|
_ = c.Reply(stickerFromID(stickerPanic), tele.Silent)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package cmds
|
package hostcmds
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
Loading…
Reference in New Issue