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)