zca-js
  • ✨Bắt đầu
    • Giới thiệu
    • Ví dụ
      • Bot nhại lại người dùng
      • Bot chào mừng thành viên
  • 🔑Đăng Nhập
    • Đăng nhập với Cookie
    • Đăng nhập với QRCode
    • Đăng nhập nhiều tài khoản
    • Sử dụng Proxy
  • 🛠️API
    • acceptFriendRequest
    • addGroupDeputy
    • addReaction
    • addUserToGroup
    • blockUser
    • changeFriendAlias
    • changeGroupAvatar
    • changeGroupName
    • changeGroupOwner
    • createGroup
    • createNote
    • createPoll
    • deleteMessage
    • disperseGroup
    • editNote
    • fetchAccountInfo
    • findUser
    • getAllFriends
    • getAllGroups
    • getContext
    • getCookie
    • getGroupInfo
    • getOwnId
    • getQR
    • getStickers
    • getStickersDetail
    • getUserInfo
    • lockPoll
    • pinConversations
    • removeGroupDeputy
    • removeUserFromGroup
    • sendCard
    • sendFriendRequest
    • sendMessage
    • sendReport
    • sendSticker
    • sendVoice
    • unblockUser
    • undo
  • 📡Listener
    • message
    • reaction
    • undo
    • group_event
Powered by GitBook
On this page
  • api.sendSticker(sticker, threadId[, type])
  • Parameters
  • Return
  • Code mẫu
  • References
  • APIs
  • Objects
  1. API

sendSticker

Gửi sticker/nhãn dán

api.sendSticker(sticker, threadId[, type])

Parameters

  • sticker Sticker

  • threadId string

    • id của người/nhóm cần gửi

  • type ThreadType?

    • loại thread: người dùng/nhóm, mặc định là người dùng

Return

Promise<SendStickerResponse>

Code mẫu

Gửi sticker "xin chào"

import { ThreadType } from "zca-js"

// tìm sticker "hello", lấy và gửi sticker đầu tiên tìm thấy
api.getStickers("hello")
    .then(async (stickerIds) => {
        const stickersDetail = await api.getStickersDetail(stickerIds[0]);
        api.sendSticker(stickersDetail[0], "0000000000000001", ThreadType.User)
            .then(console.log)
            .catch(console.error);
    })
    .catch(console.error);

References

APIs

Objects

PrevioussendReportNextsendVoice

Last updated 3 months ago

🛠️
getStickers
getStickersDetail
Sticker