feat: 更新 SendMsg 和 SendForward 函数以支持字符串类型的用户ID和群组ID,增强数据处理的灵活性
This commit is contained in:
@@ -14,14 +14,14 @@ type SendPkg struct {
|
||||
|
||||
// 上游包的参数结构体
|
||||
type UpstreamParams struct {
|
||||
UserID int64 `json:"user_id"`
|
||||
GroupID int64 `json:"group_id"`
|
||||
Message any `json:"message"`
|
||||
AutoEscape bool `json:"auto_escape"`
|
||||
UserID string `json:"user_id,omitempty"`
|
||||
GroupID string `json:"group_id,omitempty"`
|
||||
Message any `json:"message"`
|
||||
AutoEscape bool `json:"auto_escape,omitempty"`
|
||||
}
|
||||
|
||||
func GenSendPkg(userID int64, groupID int64, message any, autoEscape bool, forward bool) SendPkg {
|
||||
if groupID == 0 {
|
||||
func GenSendPkg(userID string, groupID string, message any, autoEscape bool, forward bool) SendPkg {
|
||||
if groupID == "" {
|
||||
if forward {
|
||||
return SendPkg{
|
||||
Action: constants.FORWARD_MSG_SEND,
|
||||
|
||||
Reference in New Issue
Block a user