constErrorChangeTrustTargetNotFound="无法寻找到改变目标。\nCannot find the target user."
constErrorChangeTrustRecentlyChanged="你在一个月内有设定过该名玩家的分数。你这次的更动没有被记录。\nYou have changed your score for this player within the last month. Your change was not recorded."
@ -94,8 +88,11 @@ func CheckForTrustUpdate(s *discordgo.Session, r *discordgo.MessageReactionAdd)
err:=backend.UpdateTrust(r.UserID,target,value)
iferr==db.ErrRecentlyChanged{
//TODO Move to embed.
s.ChannelMessageSend(r.ChannelID,"你在一个月内有设定过该名玩家的分数。你这次的更动没有被记录。\nYou have changed your score for this player within the last month. Your change was not recorded.")
message.InitNewEmbed(
config.ErrorChangeTrustTitle,
config.ErrorChangeTrustRecentlyChanged,
config.ErrorColour,
).Send(s,r.ChannelID)
return
}
iferr!=nil{
@ -103,5 +100,9 @@ func CheckForTrustUpdate(s *discordgo.Session, r *discordgo.MessageReactionAdd)
return
}
s.ChannelMessageSend(r.ChannelID,"已改变你给这名玩家的分数已被记录。\nThe score for this player has been updated.")