refactor: 重命名Message.RawMsg
This commit is contained in:
@@ -50,7 +50,7 @@ func getMySS(msg model.Message) (reply model.Reply) {
|
||||
|
||||
func bindSS(msg model.Message) (reply model.Reply) {
|
||||
return model.Reply{
|
||||
ReplyMsg: scoresaber.SSQuery.BindSS(strconv.Itoa(int(msg.UserId)), msg.Msg[len("绑定ss "):]),
|
||||
ReplyMsg: scoresaber.SSQuery.BindSS(strconv.Itoa(int(msg.UserId)), msg.RawMsg[len("绑定ss "):]),
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}
|
||||
@@ -66,9 +66,9 @@ func unbindSS(msg model.Message) (reply model.Reply) {
|
||||
|
||||
func getRecentScore(msg model.Message) (reply model.Reply) {
|
||||
count := 1
|
||||
if len(msg.Msg) > len("最热ss ") {
|
||||
if len(msg.RawMsg) > len("最热ss ") {
|
||||
var err error
|
||||
count, err = strconv.Atoi(msg.Msg[len("最热ss "):])
|
||||
count, err = strconv.Atoi(msg.RawMsg[len("最热ss "):])
|
||||
if err != nil || count <= 0 {
|
||||
return model.Reply{
|
||||
ReplyMsg: "",
|
||||
@@ -94,9 +94,9 @@ func getRecentScore(msg model.Message) (reply model.Reply) {
|
||||
func getMyRecentScore(msg model.Message) (reply model.Reply) {
|
||||
count := 1
|
||||
scoreMsg := ""
|
||||
if len(msg.Msg) > len("最新ss ") {
|
||||
if len(msg.RawMsg) > len("最新ss ") {
|
||||
var err error
|
||||
count, err = strconv.Atoi(msg.Msg[len("最新ss "):])
|
||||
count, err = strconv.Atoi(msg.RawMsg[len("最新ss "):])
|
||||
if err != nil || count <= 0 {
|
||||
return model.Reply{
|
||||
ReplyMsg: "",
|
||||
|
||||
Reference in New Issue
Block a user