From fbe9c3d0047dd44179837fa6e8a40a5c4d2badd0 Mon Sep 17 00:00:00 2001 From: Yiyang Kang Date: Mon, 20 Mar 2023 15:08:02 +0800 Subject: [PATCH] refactor: rename cmds -> hostcmds --- bot.go | 6 +++--- {cmds => hostcmds}/dig.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename {cmds => hostcmds}/dig.go (99%) diff --git a/bot.go b/bot.go index 1d128ec..58c6142 100644 --- a/bot.go +++ b/bot.go @@ -11,7 +11,7 @@ import ( "github.com/go-errors/errors" 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 { @@ -204,7 +204,7 @@ func handleDigCmd(c tele.Context) error { return nil } - req, err := cmds.NewDigRequest(msg.Payload) + req, err := hostcmds.NewDigRequest(msg.Payload) if err != nil { return c.Reply( "Invalid arguments.\nUsage: `/dig [type]`", @@ -213,7 +213,7 @@ func handleDigCmd(c tele.Context) error { ) } - resp, err := cmds.Dig(req) + resp, err := hostcmds.Dig(req) if err != nil { _ = c.Reply(stickerFromID(stickerPanic), tele.Silent) return err diff --git a/cmds/dig.go b/hostcmds/dig.go similarity index 99% rename from cmds/dig.go rename to hostcmds/dig.go index 59fd1c7..cf102a8 100644 --- a/cmds/dig.go +++ b/hostcmds/dig.go @@ -1,4 +1,4 @@ -package cmds +package hostcmds import ( "bufio"