From 492dad6be076892d22f26412ae12e97584340ea3 Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Mon, 12 Sep 2022 21:38:24 +0800 Subject: [PATCH] upper chars --- global/cmds.go | 2 ++ handle/replyText.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/global/cmds.go b/global/cmds.go index 1cdfcf0..750f4a1 100644 --- a/global/cmds.go +++ b/global/cmds.go @@ -8,7 +8,9 @@ var CMDList = []string{ "last", "删除图片", "删除文本", + "ETH", "eth", + "BTC", "btc", "虚拟货币", "gold", diff --git a/handle/replyText.go b/handle/replyText.go index d93b353..9b36a90 100644 --- a/handle/replyText.go +++ b/handle/replyText.go @@ -36,7 +36,7 @@ func cmdExec(msgContent MsgContent) (replyContent string) { textMd5 := utils.Md5String(lastText.Content) go RecordWechatBlockWords(lastText.Content, textMd5, msgContent.FromUsername) return - case "eth", "btc", "虚拟货币": + case "eth", "btc", "ETH", "BTC", "虚拟货币": priceBTC := api.GetBinanceLatestPrice("BTCUSDT") priceETH := api.GetBinanceLatestPrice("ETHUSDT") replyContent = fmt.Sprintf("BTC价格: %f \n ETH价格: %f", priceBTC, priceETH)