createGroup
Tạo nhóm mới
api.createGroup(options)
Parameters
options
CreateGroupOptions
CreateGroupOptions
members
string[]
id của các thành viên khác trừ bản thân
name
string?
Tên nhóm
avatarSource
AttachmentSource?
Dữ liệu ảnh nhóm
Return
Promise<CreateGroupResponse>
CreateGroupResponse
groupType
number
sucessMembers
string[]
groupId
string
errorMembers
string[]
error_data
Record<string, any>
Examples
Tạp nhóm mới
// Tạo nhóm mới cùng 2 người dùng khác
api.createGroup({
members: ["0000000000000000002", "0000000000000000003"],
name: "Nhóm Mới",
avatarSource: "./avatar.jpg", // hoặc dùng buffer
})
.then(console.log)
.catch(console.error);
Last updated