@mengkodingan/ckptw
Version:
Create powerful WhatsApp bots easily
39 lines (38 loc) • 1.65 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Group = void 0;
class Group {
constructor(ctx) {
this.ctx = ctx;
}
create(subject, members) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.ctx._client.groupCreate(subject, members);
});
}
inviteCodeInfo(code) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.ctx._client.groupGetInviteInfo(code);
});
}
acceptInvite(code) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.ctx._client.groupAcceptInvite(code);
});
}
acceptInviteV4(key, inviteMessage) {
return __awaiter(this, void 0, void 0, function* () {
return yield this.ctx._client.groupAcceptInviteV4(key, inviteMessage);
});
}
}
exports.Group = Group;