@deffa5556/bail 1.0.6 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/WAProto/index.cjs +106053 -0
- package/cjs/deffa/config.cjs +14 -0
- package/cjs/deffa/plugins/ai/deepseekr1.cjs +35 -0
- package/cjs/deffa/plugins/ai/gita.cjs +26 -0
- package/cjs/deffa/plugins/ai/glm47flash.cjs +35 -0
- package/cjs/deffa/plugins/ai/gptoss120b.cjs +35 -0
- package/cjs/deffa/plugins/ai/qwq32b.cjs +35 -0
- package/cjs/deffa/plugins/berita/antara.cjs +25 -0
- package/cjs/deffa/plugins/berita/cnbcindonesia.cjs +25 -0
- package/cjs/deffa/plugins/berita/cnn.cjs +25 -0
- package/cjs/deffa/plugins/berita/kompas.cjs +25 -0
- package/cjs/deffa/plugins/berita/liputan6.cjs +25 -0
- package/cjs/deffa/plugins/berita/merdeka.cjs +25 -0
- package/cjs/deffa/plugins/berita/sindonews.cjs +25 -0
- package/cjs/deffa/plugins/berita/tribunnews.cjs +25 -0
- package/cjs/deffa/plugins/downloader/douyin.cjs +30 -0
- package/cjs/deffa/plugins/downloader/facebook.cjs +30 -0
- package/cjs/deffa/plugins/downloader/github.cjs +35 -0
- package/cjs/deffa/plugins/downloader/lahelu.cjs +30 -0
- package/cjs/deffa/plugins/downloader/snackvideo.cjs +30 -0
- package/cjs/deffa/plugins/downloader/soundcloud.cjs +30 -0
- package/cjs/deffa/plugins/downloader/tiktok.cjs +30 -0
- package/cjs/deffa/plugins/downloader/tiktokhd.cjs +30 -0
- package/cjs/deffa/plugins/downloader/twitter.cjs +30 -0
- package/cjs/deffa/plugins/downloader/ummy.cjs +36 -0
- package/cjs/deffa/plugins/index.cjs +213 -0
- package/cjs/deffa/plugins/info/bmkg.cjs +34 -0
- package/cjs/deffa/plugins/info/cuaca.cjs +31 -0
- package/cjs/deffa/plugins/info/jadwaltv.cjs +29 -0
- package/cjs/deffa/plugins/maker/brat.cjs +45 -0
- package/cjs/deffa/plugins/maker/bratvid.cjs +52 -0
- package/cjs/deffa/plugins/search/8font.cjs +28 -0
- package/cjs/deffa/plugins/search/applemusic.cjs +28 -0
- package/cjs/deffa/plugins/search/bimg.cjs +30 -0
- package/cjs/deffa/plugins/search/brave.cjs +34 -0
- package/cjs/deffa/plugins/search/duckduckgo.cjs +28 -0
- package/cjs/deffa/plugins/search/lahelu.cjs +28 -0
- package/cjs/deffa/plugins/search/mangatoon.cjs +28 -0
- package/cjs/deffa/plugins/search/mcpedl.cjs +28 -0
- package/cjs/deffa/plugins/search/myinstants.cjs +28 -0
- package/cjs/deffa/plugins/search/otakotaku.cjs +28 -0
- package/cjs/deffa/plugins/search/pinterest.cjs +30 -0
- package/cjs/deffa/plugins/search/resep.cjs +28 -0
- package/cjs/deffa/plugins/search/seegore.cjs +30 -0
- package/cjs/deffa/plugins/search/soundcloud.cjs +28 -0
- package/cjs/deffa/plugins/search/youtube.cjs +28 -0
- package/cjs/deffa/plugins/stalk/github.cjs +38 -0
- package/cjs/deffa/plugins/stalk/pinterest.cjs +37 -0
- package/cjs/deffa/plugins/stalk/threads.cjs +34 -0
- package/cjs/deffa/plugins/stalk/tiktok.cjs +37 -0
- package/cjs/deffa/plugins/stalk/twitter.cjs +37 -0
- package/cjs/deffa/plugins/stalk/youtube.cjs +37 -0
- package/cjs/lib/Defaults/index.cjs +158 -0
- package/cjs/lib/Discord/Client.cjs +263 -0
- package/cjs/lib/Discord/Constants.cjs +1842 -0
- package/cjs/lib/Discord/connect-dc.cjs +11 -0
- package/cjs/lib/Discord/esm-bridge.cjs +136 -0
- package/cjs/lib/Discord/gateway/Dispatcher.cjs +93 -0
- package/cjs/lib/Discord/gateway/Shard.cjs +695 -0
- package/cjs/lib/Discord/gateway/ShardManager.cjs +344 -0
- package/cjs/lib/Discord/gateway/compression/base.cjs +13 -0
- package/cjs/lib/Discord/gateway/compression/config.cjs +47 -0
- package/cjs/lib/Discord/gateway/compression/pako.cjs +44 -0
- package/cjs/lib/Discord/gateway/compression/zlib-native.cjs +47 -0
- package/cjs/lib/Discord/gateway/compression/zlib-sync.cjs +31 -0
- package/cjs/lib/Discord/gateway/compression/zstd-napi.cjs +80 -0
- package/cjs/lib/Discord/gateway/compression/zstd-native.cjs +46 -0
- package/cjs/lib/Discord/gateway/events.cjs +956 -0
- package/cjs/lib/Discord/index.cjs +238 -0
- package/cjs/lib/Discord/rest/Bucket.cjs +69 -0
- package/cjs/lib/Discord/rest/DiscordHTTPError.cjs +63 -0
- package/cjs/lib/Discord/rest/DiscordRESTError.cjs +84 -0
- package/cjs/lib/Discord/rest/OAuthHelper.cjs +226 -0
- package/cjs/lib/Discord/rest/RESTManager.cjs +116 -0
- package/cjs/lib/Discord/rest/RequestHandler.cjs +320 -0
- package/cjs/lib/Discord/rest/SequentialBucket.cjs +69 -0
- package/cjs/lib/Discord/routes/Applications.cjs +625 -0
- package/cjs/lib/Discord/routes/Channels.cjs +1199 -0
- package/cjs/lib/Discord/routes/Guilds.cjs +1792 -0
- package/cjs/lib/Discord/routes/Interactions.cjs +212 -0
- package/cjs/lib/Discord/routes/Lobbies.cjs +197 -0
- package/cjs/lib/Discord/routes/Miscellaneous.cjs +120 -0
- package/cjs/lib/Discord/routes/OAuth.cjs +350 -0
- package/cjs/lib/Discord/routes/Users.cjs +107 -0
- package/cjs/lib/Discord/routes/Webhooks.cjs +308 -0
- package/cjs/lib/Discord/structures/AnnouncementChannel.cjs +46 -0
- package/cjs/lib/Discord/structures/AnnouncementThreadChannel.cjs +28 -0
- package/cjs/lib/Discord/structures/Application.cjs +345 -0
- package/cjs/lib/Discord/structures/ApplicationCommand.cjs +109 -0
- package/cjs/lib/Discord/structures/Attachment.cjs +46 -0
- package/cjs/lib/Discord/structures/AuditLogEntry.cjs +41 -0
- package/cjs/lib/Discord/structures/AutoModerationRule.cjs +117 -0
- package/cjs/lib/Discord/structures/AutocompleteInteraction.cjs +90 -0
- package/cjs/lib/Discord/structures/Base.cjs +56 -0
- package/cjs/lib/Discord/structures/BaseEntitlement.cjs +40 -0
- package/cjs/lib/Discord/structures/CategoryChannel.cjs +102 -0
- package/cjs/lib/Discord/structures/Channel.cjs +89 -0
- package/cjs/lib/Discord/structures/ClientApplication.cjs +269 -0
- package/cjs/lib/Discord/structures/CommandInteraction.cjs +294 -0
- package/cjs/lib/Discord/structures/ComponentInteraction.cjs +306 -0
- package/cjs/lib/Discord/structures/Entitlement.cjs +24 -0
- package/cjs/lib/Discord/structures/ExtendedUser.cjs +48 -0
- package/cjs/lib/Discord/structures/ForumChannel.cjs +20 -0
- package/cjs/lib/Discord/structures/GroupChannel.cjs +160 -0
- package/cjs/lib/Discord/structures/Guild.cjs +1289 -0
- package/cjs/lib/Discord/structures/GuildChannel.cjs +82 -0
- package/cjs/lib/Discord/structures/GuildPreview.cjs +141 -0
- package/cjs/lib/Discord/structures/GuildScheduledEvent.cjs +166 -0
- package/cjs/lib/Discord/structures/GuildTemplate.cjs +96 -0
- package/cjs/lib/Discord/structures/Integration.cjs +123 -0
- package/cjs/lib/Discord/structures/Interaction.cjs +78 -0
- package/cjs/lib/Discord/structures/InteractionResolvedChannel.cjs +36 -0
- package/cjs/lib/Discord/structures/Invite.cjs +196 -0
- package/cjs/lib/Discord/structures/InviteGuild.cjs +117 -0
- package/cjs/lib/Discord/structures/InviteRole.cjs +88 -0
- package/cjs/lib/Discord/structures/Lobby.cjs +84 -0
- package/cjs/lib/Discord/structures/LobbyMember.cjs +30 -0
- package/cjs/lib/Discord/structures/MediaChannel.cjs +20 -0
- package/cjs/lib/Discord/structures/Member.cjs +300 -0
- package/cjs/lib/Discord/structures/Message.cjs +553 -0
- package/cjs/lib/Discord/structures/ModalSubmitInteraction.cjs +263 -0
- package/cjs/lib/Discord/structures/OAuthApplication.cjs +203 -0
- package/cjs/lib/Discord/structures/OAuthGuild.cjs +98 -0
- package/cjs/lib/Discord/structures/PartialApplication.cjs +97 -0
- package/cjs/lib/Discord/structures/Permission.cjs +61 -0
- package/cjs/lib/Discord/structures/PermissionOverwrite.cjs +46 -0
- package/cjs/lib/Discord/structures/PingInteraction.cjs +27 -0
- package/cjs/lib/Discord/structures/Poll.cjs +69 -0
- package/cjs/lib/Discord/structures/PrimaryGuild.cjs +93 -0
- package/cjs/lib/Discord/structures/PrivateChannel.cjs +131 -0
- package/cjs/lib/Discord/structures/PrivateThreadChannel.cjs +28 -0
- package/cjs/lib/Discord/structures/PublicThreadChannel.cjs +36 -0
- package/cjs/lib/Discord/structures/Role.cjs +126 -0
- package/cjs/lib/Discord/structures/SKU.cjs +58 -0
- package/cjs/lib/Discord/structures/Soundboard.cjs +58 -0
- package/cjs/lib/Discord/structures/StageChannel.cjs +45 -0
- package/cjs/lib/Discord/structures/StageInstance.cjs +80 -0
- package/cjs/lib/Discord/structures/Subscription.cjs +21 -0
- package/cjs/lib/Discord/structures/Team.cjs +70 -0
- package/cjs/lib/Discord/structures/TestEntitlement.cjs +22 -0
- package/cjs/lib/Discord/structures/TextChannel.cjs +48 -0
- package/cjs/lib/Discord/structures/TextableChannel.cjs +265 -0
- package/cjs/lib/Discord/structures/TextableVoiceChannel.cjs +70 -0
- package/cjs/lib/Discord/structures/ThreadChannel.cjs +276 -0
- package/cjs/lib/Discord/structures/ThreadOnlyChannel.cjs +205 -0
- package/cjs/lib/Discord/structures/ThreadableChannel.cjs +57 -0
- package/cjs/lib/Discord/structures/UnavailableGuild.cjs +21 -0
- package/cjs/lib/Discord/structures/User.cjs +223 -0
- package/cjs/lib/Discord/structures/VoiceChannel.cjs +34 -0
- package/cjs/lib/Discord/structures/VoiceState.cjs +113 -0
- package/cjs/lib/Discord/structures/Webhook.cjs +224 -0
- package/cjs/lib/Discord/util/Collection.cjs +77 -0
- package/cjs/lib/Discord/util/Errors.cjs +81 -0
- package/cjs/lib/Discord/util/QueryBuilder.cjs +20 -0
- package/cjs/lib/Discord/util/Routes.cjs +293 -0
- package/cjs/lib/Discord/util/SimpleCollection.cjs +78 -0
- package/cjs/lib/Discord/util/Time.cjs +92 -0
- package/cjs/lib/Discord/util/TypedCollection.cjs +78 -0
- package/cjs/lib/Discord/util/TypedEmitter.cjs +20 -0
- package/cjs/lib/Discord/util/Util.cjs +906 -0
- package/cjs/lib/Discord/util/interactions/InteractionOptionsWrapper.cjs +207 -0
- package/cjs/lib/Discord/util/interactions/MessageInteractionResponse.cjs +26 -0
- package/cjs/lib/Discord/util/interactions/ModalSubmitInteractionComponentsWrapper.cjs +98 -0
- package/cjs/lib/Discord/util/interactions/SelectMenuValuesWrapper.cjs +77 -0
- package/cjs/lib/Discord/util/interactions/shared.cjs +20 -0
- package/cjs/lib/Discord/util/warning.cjs +34 -0
- package/cjs/lib/Signal/Group/ciphertext-message.cjs +16 -0
- package/cjs/lib/Signal/Group/group-session-builder.cjs +67 -0
- package/cjs/lib/Signal/Group/group_cipher.cjs +86 -0
- package/cjs/lib/Signal/Group/index.cjs +58 -0
- package/cjs/lib/Signal/Group/keyhelper.cjs +56 -0
- package/cjs/lib/Signal/Group/sender-chain-key.cjs +30 -0
- package/cjs/lib/Signal/Group/sender-key-distribution-message.cjs +67 -0
- package/cjs/lib/Signal/Group/sender-key-message.cjs +70 -0
- package/cjs/lib/Signal/Group/sender-key-name.cjs +52 -0
- package/cjs/lib/Signal/Group/sender-key-record.cjs +45 -0
- package/cjs/lib/Signal/Group/sender-key-state.cjs +88 -0
- package/cjs/lib/Signal/Group/sender-message-key.cjs +30 -0
- package/cjs/lib/Signal/libsignal.cjs +467 -0
- package/cjs/lib/Signal/lid-mapping.cjs +281 -0
- package/cjs/lib/Socket/Client/index.cjs +19 -0
- package/cjs/lib/Socket/Client/types.cjs +15 -0
- package/cjs/lib/Socket/Client/websocket.cjs +61 -0
- package/cjs/lib/Socket/business.cjs +384 -0
- package/cjs/lib/Socket/chats.cjs +1221 -0
- package/cjs/lib/Socket/communities.cjs +440 -0
- package/cjs/lib/Socket/groups.cjs +353 -0
- package/cjs/lib/Socket/index.cjs +14 -0
- package/cjs/lib/Socket/messages-recv.cjs +1772 -0
- package/cjs/lib/Socket/messages-send.cjs +1376 -0
- package/cjs/lib/Socket/mex.cjs +46 -0
- package/cjs/lib/Socket/newsletter.cjs +230 -0
- package/cjs/lib/Socket/socket.cjs +976 -0
- package/cjs/lib/Store/index.cjs +20 -0
- package/cjs/lib/Store/make-in-memory-store.cjs +470 -0
- package/cjs/lib/Store/make-ordered-dictionary.cjs +82 -0
- package/cjs/lib/Store/object-repository.cjs +28 -0
- package/cjs/lib/Telegram/button.cjs +147 -0
- package/cjs/lib/Telegram/composer.cjs +582 -0
- package/cjs/lib/Telegram/context.cjs +853 -0
- package/cjs/lib/Telegram/core/helpers/args.cjs +57 -0
- package/cjs/lib/Telegram/core/helpers/check.cjs +55 -0
- package/cjs/lib/Telegram/core/helpers/compact.cjs +16 -0
- package/cjs/lib/Telegram/core/helpers/deunionize.cjs +12 -0
- package/cjs/lib/Telegram/core/helpers/formatting.cjs +91 -0
- package/cjs/lib/Telegram/core/helpers/util.cjs +50 -0
- package/cjs/lib/Telegram/core/network/client.cjs +338 -0
- package/cjs/lib/Telegram/core/network/error.cjs +21 -0
- package/cjs/lib/Telegram/core/network/multipart-stream.cjs +79 -0
- package/cjs/lib/Telegram/core/network/polling.cjs +87 -0
- package/cjs/lib/Telegram/core/network/webhook.cjs +54 -0
- package/cjs/lib/Telegram/core/types/typegram.cjs +31 -0
- package/cjs/lib/Telegram/deffa-telegraf.cjs +264 -0
- package/cjs/lib/Telegram/esm-bridge.cjs +20 -0
- package/cjs/lib/Telegram/filters.cjs +69 -0
- package/cjs/lib/Telegram/format.cjs +58 -0
- package/cjs/lib/Telegram/future.cjs +140 -0
- package/cjs/lib/Telegram/index.cjs +67 -0
- package/cjs/lib/Telegram/input.cjs +61 -0
- package/cjs/lib/Telegram/markup.cjs +129 -0
- package/cjs/lib/Telegram/middleware.cjs +2 -0
- package/cjs/lib/Telegram/reactions.cjs +84 -0
- package/cjs/lib/Telegram/router.cjs +46 -0
- package/cjs/lib/Telegram/scenes/base.cjs +39 -0
- package/cjs/lib/Telegram/scenes/context.cjs +104 -0
- package/cjs/lib/Telegram/scenes/index.cjs +21 -0
- package/cjs/lib/Telegram/scenes/stage.cjs +49 -0
- package/cjs/lib/Telegram/scenes/wizard/context.cjs +31 -0
- package/cjs/lib/Telegram/scenes/wizard/index.cjs +45 -0
- package/cjs/lib/Telegram/scenes.cjs +21 -0
- package/cjs/lib/Telegram/session.cjs +166 -0
- package/cjs/lib/Telegram/telegram-types.cjs +6 -0
- package/cjs/lib/Telegram/telegram.cjs +945 -0
- package/cjs/lib/Telegram/types.cjs +2 -0
- package/cjs/lib/Telegram/utils.cjs +5 -0
- package/cjs/lib/Types/Auth.cjs +3 -0
- package/cjs/lib/Types/Bussines.cjs +3 -0
- package/cjs/lib/Types/Call.cjs +3 -0
- package/cjs/lib/Types/Chat.cjs +11 -0
- package/cjs/lib/Types/Contact.cjs +3 -0
- package/cjs/lib/Types/Events.cjs +4 -0
- package/cjs/lib/Types/GroupMetadata.cjs +3 -0
- package/cjs/lib/Types/Label.cjs +26 -0
- package/cjs/lib/Types/LabelAssociation.cjs +8 -0
- package/cjs/lib/Types/Message.cjs +19 -0
- package/cjs/lib/Types/Mex.cjs +40 -0
- package/cjs/lib/Types/Product.cjs +3 -0
- package/cjs/lib/Types/RichType.cjs +24 -0
- package/cjs/lib/Types/Signal.cjs +4 -0
- package/cjs/lib/Types/Socket.cjs +4 -0
- package/cjs/lib/Types/State.cjs +54 -0
- package/cjs/lib/Types/USync.cjs +4 -0
- package/cjs/lib/Types/index.cjs +42 -0
- package/cjs/lib/Utils/auth-utils.cjs +312 -0
- package/cjs/lib/Utils/browser-utils.cjs +39 -0
- package/cjs/lib/Utils/business.cjs +241 -0
- package/cjs/lib/Utils/chat-utils.cjs +890 -0
- package/cjs/lib/Utils/companion-reg-client-utils.cjs +51 -0
- package/cjs/lib/Utils/crypto.cjs +170 -0
- package/cjs/lib/Utils/decode-wa-message.cjs +330 -0
- package/cjs/lib/Utils/event-buffer.cjs +629 -0
- package/cjs/lib/Utils/generics.cjs +427 -0
- package/cjs/lib/Utils/history.cjs +141 -0
- package/cjs/lib/Utils/identity-change-handler.cjs +56 -0
- package/cjs/lib/Utils/index.cjs +43 -0
- package/cjs/lib/Utils/link-preview.cjs +122 -0
- package/cjs/lib/Utils/logger.cjs +8 -0
- package/cjs/lib/Utils/lt-hash.cjs +11 -0
- package/cjs/lib/Utils/make-mutex.cjs +38 -0
- package/cjs/lib/Utils/message-retry-manager.cjs +267 -0
- package/cjs/lib/Utils/messages-media.cjs +906 -0
- package/cjs/lib/Utils/messages.cjs +1909 -0
- package/cjs/lib/Utils/noise-handler.cjs +205 -0
- package/cjs/lib/Utils/offline-node-processor.cjs +43 -0
- package/cjs/lib/Utils/pre-key-manager.cjs +113 -0
- package/cjs/lib/Utils/process-message.cjs +755 -0
- package/cjs/lib/Utils/reporting-utils.cjs +263 -0
- package/cjs/lib/Utils/rich-message-utils.cjs +434 -0
- package/cjs/lib/Utils/session-guard.cjs +163 -0
- package/cjs/lib/Utils/signal.cjs +214 -0
- package/cjs/lib/Utils/stanza-ack.cjs +41 -0
- package/cjs/lib/Utils/sync-action-utils.cjs +54 -0
- package/cjs/lib/Utils/tc-token-utils.cjs +174 -0
- package/cjs/lib/Utils/text-sticker.cjs +174 -0
- package/cjs/lib/Utils/use-multi-file-auth-state.cjs +125 -0
- package/cjs/lib/Utils/use-single-file-auth-state.cjs +113 -0
- package/cjs/lib/Utils/use-sqlite-auth-state.cjs +145 -0
- package/cjs/lib/Utils/validate-connection.cjs +210 -0
- package/cjs/lib/WABinary/constants.cjs +1470 -0
- package/cjs/lib/WABinary/decode.cjs +301 -0
- package/cjs/lib/WABinary/encode.cjs +257 -0
- package/cjs/lib/WABinary/generic-utils.cjs +240 -0
- package/cjs/lib/WABinary/index.cjs +22 -0
- package/cjs/lib/WABinary/jid-utils.cjs +114 -0
- package/cjs/lib/WABinary/types.cjs +37 -0
- package/cjs/lib/WAM/BinaryInfo.cjs +14 -0
- package/cjs/lib/WAM/constants.cjs +22856 -0
- package/cjs/lib/WAM/encode.cjs +154 -0
- package/cjs/lib/WAM/index.cjs +20 -0
- package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.cjs +56 -0
- package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.cjs +58 -0
- package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.cjs +31 -0
- package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.cjs +42 -0
- package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.cjs +29 -0
- package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.cjs +55 -0
- package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.cjs +33 -0
- package/cjs/lib/WAUSync/Protocols/index.cjs +22 -0
- package/cjs/lib/WAUSync/USyncQuery.cjs +102 -0
- package/cjs/lib/WAUSync/USyncUser.cjs +35 -0
- package/cjs/lib/WAUSync/index.cjs +20 -0
- package/cjs/lib/index.cjs +372 -0
- package/cjs/lib/plugins/loader.cjs +117 -0
- package/lib/Defaults/index.js +1 -1
- package/lib/Socket/socket.js +3 -3
- package/lib/Telegram/esm-bridge.mjs +1 -1
- package/package.json +11 -6
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.manga = exports.mcpedl = exports.resep = exports.pin = exports.bimg = exports.ddg = exports.brave = exports.yt = exports.github = exports.lahelu = exports.ummy = exports.soundcloud = exports.snack = exports.douyin = exports.fb = exports.twitter = exports.tiktokhd = exports.tiktok = exports.tribun = exports.sindo = exports.merdeka = exports.liputan6 = exports.antara = exports.kompas = exports.cnn = exports.cnbc = exports.gita = exports.gpt = exports.glm = exports.qwq = exports.deepseek = exports.ai = exports.deffaCommands = exports.TelegramScenes = exports.TelegramFormat = exports.TelegramInput = exports.TelegramMarkup = exports.TelegramTypes = exports.deunionize = exports.MemorySessionStore = exports.telegramSession = exports.TelegramError = exports.Telegram = exports.Router = exports.Context = exports.Composer = exports.DeffaTelegraf = exports.makeWASocket = exports.plugins = exports.listPlugins = void 0;
|
|
43
|
+
exports.connectDiscord = exports.ExtendedUser = exports.ForumChannel = exports.GroupChannel = exports.Guild = exports.GuildChannel = exports.GuildPreview = exports.GuildScheduledEvent = exports.GuildTemplate = exports.Integration = exports.InteractionResolvedChannel = exports.InteractionOptionsWrapper = exports.Invite = exports.InviteGuild = exports.InviteRole = exports.Lobby = exports.LobbyMember = exports.MediaChannel = exports.Member = exports.Message = exports.MessageInteractionResponse = exports.ModalSubmitInteraction = exports.ModalSubmitInteractionComponentsWrapper = exports.OAuthApplication = exports.OAuthGuild = exports.RESTManager = exports.Dispatcher = exports.ShardManager = exports.Shard = exports.Constants = exports.Client = exports.bratvid = exports.brat = exports.jadwaltv = exports.bmkg = exports.cuaca = exports.stalkthreads = exports.stalkpin = exports.stalkgithub = exports.stalkyt = exports.stalktiktok = exports.stalktwitter = exports.scsearch = exports.myinstants = exports.sfont = exports.seegore = exports.apple = exports.otaku = void 0;
|
|
44
|
+
exports.connectTelegram = connectTelegram;
|
|
45
|
+
exports.testMessage = testMessage;
|
|
46
|
+
const os_1 = __importDefault(require("os"));
|
|
47
|
+
const v8_1 = __importDefault(require("v8"));
|
|
48
|
+
const index_js_1 = __importDefault(require("./Socket/index.cjs"));
|
|
49
|
+
exports.makeWASocket = index_js_1.default;
|
|
50
|
+
const loader_js_1 = __importStar(require("./plugins/loader.cjs"));
|
|
51
|
+
Object.defineProperty(exports, "listPlugins", { enumerable: true, get: function () { return loader_js_1.listPlugins; } });
|
|
52
|
+
const esm_bridge_mjs_1 = require("./Telegram/esm-bridge.cjs");
|
|
53
|
+
Object.defineProperty(exports, "DeffaTelegraf", { enumerable: true, get: function () { return esm_bridge_mjs_1.DeffaTelegraf; } });
|
|
54
|
+
Object.defineProperty(exports, "Composer", { enumerable: true, get: function () { return esm_bridge_mjs_1.Composer; } });
|
|
55
|
+
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return esm_bridge_mjs_1.Context; } });
|
|
56
|
+
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return esm_bridge_mjs_1.Router; } });
|
|
57
|
+
Object.defineProperty(exports, "Telegram", { enumerable: true, get: function () { return esm_bridge_mjs_1.Telegram; } });
|
|
58
|
+
Object.defineProperty(exports, "TelegramError", { enumerable: true, get: function () { return esm_bridge_mjs_1.TelegramError; } });
|
|
59
|
+
Object.defineProperty(exports, "telegramSession", { enumerable: true, get: function () { return esm_bridge_mjs_1.session; } });
|
|
60
|
+
Object.defineProperty(exports, "MemorySessionStore", { enumerable: true, get: function () { return esm_bridge_mjs_1.MemorySessionStore; } });
|
|
61
|
+
Object.defineProperty(exports, "deunionize", { enumerable: true, get: function () { return esm_bridge_mjs_1.deunionize; } });
|
|
62
|
+
Object.defineProperty(exports, "TelegramTypes", { enumerable: true, get: function () { return esm_bridge_mjs_1.Types; } });
|
|
63
|
+
Object.defineProperty(exports, "TelegramMarkup", { enumerable: true, get: function () { return esm_bridge_mjs_1.Markup; } });
|
|
64
|
+
Object.defineProperty(exports, "TelegramInput", { enumerable: true, get: function () { return esm_bridge_mjs_1.Input; } });
|
|
65
|
+
Object.defineProperty(exports, "TelegramFormat", { enumerable: true, get: function () { return esm_bridge_mjs_1.Format; } });
|
|
66
|
+
Object.defineProperty(exports, "TelegramScenes", { enumerable: true, get: function () { return esm_bridge_mjs_1.Scenes; } });
|
|
67
|
+
// ── Deffa Discord —
|
|
68
|
+
const esm_bridge_mjs_2 = require("./Discord/esm-bridge.cjs");
|
|
69
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return esm_bridge_mjs_2.Client; } });
|
|
70
|
+
Object.defineProperty(exports, "Constants", { enumerable: true, get: function () { return esm_bridge_mjs_2.Constants; } });
|
|
71
|
+
Object.defineProperty(exports, "Shard", { enumerable: true, get: function () { return esm_bridge_mjs_2.Shard; } });
|
|
72
|
+
Object.defineProperty(exports, "ShardManager", { enumerable: true, get: function () { return esm_bridge_mjs_2.ShardManager; } });
|
|
73
|
+
Object.defineProperty(exports, "Dispatcher", { enumerable: true, get: function () { return esm_bridge_mjs_2.Dispatcher; } });
|
|
74
|
+
Object.defineProperty(exports, "RESTManager", { enumerable: true, get: function () { return esm_bridge_mjs_2.RESTManager; } });
|
|
75
|
+
Object.defineProperty(exports, "OAuthGuild", { enumerable: true, get: function () { return esm_bridge_mjs_2.OAuthGuild; } });
|
|
76
|
+
Object.defineProperty(exports, "OAuthApplication", { enumerable: true, get: function () { return esm_bridge_mjs_2.OAuthApplication; } });
|
|
77
|
+
Object.defineProperty(exports, "ModalSubmitInteractionComponentsWrapper", { enumerable: true, get: function () { return esm_bridge_mjs_2.ModalSubmitInteractionComponentsWrapper; } });
|
|
78
|
+
Object.defineProperty(exports, "ModalSubmitInteraction", { enumerable: true, get: function () { return esm_bridge_mjs_2.ModalSubmitInteraction; } });
|
|
79
|
+
Object.defineProperty(exports, "MessageInteractionResponse", { enumerable: true, get: function () { return esm_bridge_mjs_2.MessageInteractionResponse; } });
|
|
80
|
+
Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return esm_bridge_mjs_2.Message; } });
|
|
81
|
+
Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return esm_bridge_mjs_2.Member; } });
|
|
82
|
+
Object.defineProperty(exports, "MediaChannel", { enumerable: true, get: function () { return esm_bridge_mjs_2.MediaChannel; } });
|
|
83
|
+
Object.defineProperty(exports, "LobbyMember", { enumerable: true, get: function () { return esm_bridge_mjs_2.LobbyMember; } });
|
|
84
|
+
Object.defineProperty(exports, "Lobby", { enumerable: true, get: function () { return esm_bridge_mjs_2.Lobby; } });
|
|
85
|
+
Object.defineProperty(exports, "InviteRole", { enumerable: true, get: function () { return esm_bridge_mjs_2.InviteRole; } });
|
|
86
|
+
Object.defineProperty(exports, "InviteGuild", { enumerable: true, get: function () { return esm_bridge_mjs_2.InviteGuild; } });
|
|
87
|
+
Object.defineProperty(exports, "Invite", { enumerable: true, get: function () { return esm_bridge_mjs_2.Invite; } });
|
|
88
|
+
Object.defineProperty(exports, "InteractionOptionsWrapper", { enumerable: true, get: function () { return esm_bridge_mjs_2.InteractionOptionsWrapper; } });
|
|
89
|
+
Object.defineProperty(exports, "InteractionResolvedChannel", { enumerable: true, get: function () { return esm_bridge_mjs_2.InteractionResolvedChannel; } });
|
|
90
|
+
Object.defineProperty(exports, "Integration", { enumerable: true, get: function () { return esm_bridge_mjs_2.Integration; } });
|
|
91
|
+
Object.defineProperty(exports, "GuildTemplate", { enumerable: true, get: function () { return esm_bridge_mjs_2.GuildTemplate; } });
|
|
92
|
+
Object.defineProperty(exports, "GuildScheduledEvent", { enumerable: true, get: function () { return esm_bridge_mjs_2.GuildScheduledEvent; } });
|
|
93
|
+
Object.defineProperty(exports, "GuildPreview", { enumerable: true, get: function () { return esm_bridge_mjs_2.GuildPreview; } });
|
|
94
|
+
Object.defineProperty(exports, "GuildChannel", { enumerable: true, get: function () { return esm_bridge_mjs_2.GuildChannel; } });
|
|
95
|
+
Object.defineProperty(exports, "Guild", { enumerable: true, get: function () { return esm_bridge_mjs_2.Guild; } });
|
|
96
|
+
Object.defineProperty(exports, "GroupChannel", { enumerable: true, get: function () { return esm_bridge_mjs_2.GroupChannel; } });
|
|
97
|
+
Object.defineProperty(exports, "ForumChannel", { enumerable: true, get: function () { return esm_bridge_mjs_2.ForumChannel; } });
|
|
98
|
+
Object.defineProperty(exports, "ExtendedUser", { enumerable: true, get: function () { return esm_bridge_mjs_2.ExtendedUser; } });
|
|
99
|
+
Object.defineProperty(exports, "connectDiscord", { enumerable: true, get: function () { return esm_bridge_mjs_2.connectDiscord; } });
|
|
100
|
+
// ── Deffa Boot ──────────────────────────────────────────────────────────────
|
|
101
|
+
function _color(text, hex) {
|
|
102
|
+
const h = hex.replace('#', '');
|
|
103
|
+
const r = parseInt(h.slice(0, 2), 16), g = parseInt(h.slice(2, 4), 16), b = parseInt(h.slice(4, 6), 16);
|
|
104
|
+
return `\x1b[38;2;${r};${g};${b}m${text}\x1b[0m`;
|
|
105
|
+
}
|
|
106
|
+
function _printBoot() {
|
|
107
|
+
const pluginKeys = Object.keys(loader_js_1.default);
|
|
108
|
+
const metrics = (() => {
|
|
109
|
+
const m = process.memoryUsage();
|
|
110
|
+
return {
|
|
111
|
+
heapUsed: (m.heapUsed / 1024 / 1024).toFixed(1),
|
|
112
|
+
heapTotal: (m.heapTotal / 1024 / 1024).toFixed(1),
|
|
113
|
+
rss: (m.rss / 1024 / 1024).toFixed(1),
|
|
114
|
+
};
|
|
115
|
+
})();
|
|
116
|
+
const c = {
|
|
117
|
+
cyan: (t) => _color(t, '#00f2fe'),
|
|
118
|
+
purple: (t) => _color(t, '#a18cd1'),
|
|
119
|
+
pink: (t) => _color(t, '#fbc2eb'),
|
|
120
|
+
dim: (t) => _color(t, '#8e9eab'),
|
|
121
|
+
white: (t) => _color(t, '#eef2f3'),
|
|
122
|
+
green: (t) => _color(t, '#00b09b'),
|
|
123
|
+
sep: (t) => _color(t, '#3f4c6b'),
|
|
124
|
+
};
|
|
125
|
+
const line = c.dim('⸻'.repeat(36));
|
|
126
|
+
const dot = c.cyan(' ✦ ');
|
|
127
|
+
process.stdout.write('\n');
|
|
128
|
+
process.stdout.write(` ${c.cyan('⟡')} ${c.white('\x1b[1mDEFFA BAILEYS\x1b[0m')} ${c.dim('⸺')} ${c.cyan('WhatsApp Web SDK Core')}\n`);
|
|
129
|
+
process.stdout.write(` ${c.purple('v2.0.0')}${dot}${c.pink('ESM Architecture')}${dot}${c.purple('Deffa Protocol')}\n`);
|
|
130
|
+
process.stdout.write(` ${line}\n`);
|
|
131
|
+
process.stdout.write(` ${c.dim(' Plugins')} ${c.sep('⸺')} ${c.white(pluginKeys.slice(0, 5).join(', '))}${pluginKeys.length > 5 ? c.dim(` +${pluginKeys.length - 5} more`) : ''}\n`);
|
|
132
|
+
process.stdout.write(` ${c.dim(' Heap')} ${c.sep('⸺')} ${c.white(`${metrics.heapUsed} MB / ${metrics.heapTotal} MB`)}\n`);
|
|
133
|
+
process.stdout.write(` ${c.dim(' Node.js')} ${c.sep('⸺')} ${c.white(`${process.version} on ${os_1.default.platform()}-${os_1.default.arch()}`)}\n`);
|
|
134
|
+
process.stdout.write(` ${line}\n`);
|
|
135
|
+
process.stdout.write(` ${c.green('✦')} ${c.white(`${pluginKeys.length} plugins loaded`)}\n\n`);
|
|
136
|
+
}
|
|
137
|
+
async function connectTelegram(token) {
|
|
138
|
+
const c = {
|
|
139
|
+
pink: (t) => _color(t, '#fbc2eb'),
|
|
140
|
+
dim: (t) => _color(t, '#8e9eab'),
|
|
141
|
+
white: (t) => _color(t, '#eef2f3'),
|
|
142
|
+
green: (t) => _color(t, '#00b09b'),
|
|
143
|
+
red: (t) => _color(t, '#ff0844'),
|
|
144
|
+
sep: (t) => _color(t, '#3f4c6b'),
|
|
145
|
+
};
|
|
146
|
+
if (!token || token.length < 20 || token === 'YOUR_TELEGRAM_TOKEN') {
|
|
147
|
+
process.stdout.write(` ${c.dim('✦')} ${c.dim('Telegram: token not set, skip')}\n\n`);
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const start = Date.now();
|
|
152
|
+
const res = await fetch(`https://api.telegram.org/bot${token}/getMe`);
|
|
153
|
+
const data = await res.json();
|
|
154
|
+
const ms = Date.now() - start;
|
|
155
|
+
if (!data.ok) {
|
|
156
|
+
process.stdout.write(` ${c.red('✕')} ${c.red(`Telegram: ${data.description || 'invalid token'}`)}\n\n`);
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
const bot = data.result;
|
|
160
|
+
const mask = `${token.slice(0, 6)}${'•'.repeat(20)}${token.slice(-4)}`;
|
|
161
|
+
process.stdout.write(` ${c.green('✦')} ${c.white('Telegram')} ${c.sep('⸺')} ${c.pink(`@${bot.username}`)} ${c.dim(`(${ms}ms)`)}\n`);
|
|
162
|
+
process.stdout.write(` ${c.dim(' Token')} ${c.sep('⸺')} ${c.dim(mask)}\n\n`);
|
|
163
|
+
return bot;
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
process.stdout.write(` ${c.red('✕')} ${c.red(`Telegram error: ${e.message}`)}\n\n`);
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
_printBoot();
|
|
171
|
+
const plugins = loader_js_1.default;
|
|
172
|
+
exports.plugins = plugins;
|
|
173
|
+
/**
|
|
174
|
+
* testMessage — tes kirim semua jenis message Baileys di group/private mana aja.
|
|
175
|
+
*
|
|
176
|
+
* Usage:
|
|
177
|
+
* import { testMessage } from 'deffa-baileys'
|
|
178
|
+
* // Di handler msg:
|
|
179
|
+
* await testMessage(sock, m.key.remoteJid)
|
|
180
|
+
* // Atau pakai reply ke pesan tertentu:
|
|
181
|
+
* await testMessage(sock, m.key.remoteJid, { quoted: m })
|
|
182
|
+
*
|
|
183
|
+
* @param {import('./Socket/index.cjs').default} sock - makeWASocket instance
|
|
184
|
+
* @param {string} jid - target JID (group/private, auto-detect)
|
|
185
|
+
* @param {object} [opts] - optional: { quoted, delay }
|
|
186
|
+
*/
|
|
187
|
+
async function testMessage(sock, jid, opts = {}) {
|
|
188
|
+
const { quoted = null, delay: delayMs = 500 } = opts;
|
|
189
|
+
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
|
190
|
+
const send = async (content) => {
|
|
191
|
+
await sock.sendMessage(jid, content, quoted ? { quoted } : {});
|
|
192
|
+
await sleep(delayMs);
|
|
193
|
+
};
|
|
194
|
+
// 1. Text biasa
|
|
195
|
+
await send({ text: '✅ *[TEST 1]* text biasa' });
|
|
196
|
+
// 2. Text + mention (group: mention all, private: mention self)
|
|
197
|
+
const isGroup = jid.endsWith('@g.us');
|
|
198
|
+
let members = [];
|
|
199
|
+
if (isGroup) {
|
|
200
|
+
try {
|
|
201
|
+
const meta = await sock.groupMetadata(jid);
|
|
202
|
+
members = meta.participants.map(p => p.id);
|
|
203
|
+
}
|
|
204
|
+
catch (_) { }
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
members = [jid];
|
|
208
|
+
}
|
|
209
|
+
await send({
|
|
210
|
+
text: `✅ *[TEST 2]* mention: ${members.slice(0, 3).map(m => `@${m.split('@')[0]}`).join(' ')}`,
|
|
211
|
+
mentions: members.slice(0, 3),
|
|
212
|
+
});
|
|
213
|
+
// 3. Image dari URL
|
|
214
|
+
await send({
|
|
215
|
+
image: { url: 'https://i.imgur.com/vBLUIvl.jpeg' },
|
|
216
|
+
caption: '✅ *[TEST 3]* image + caption',
|
|
217
|
+
});
|
|
218
|
+
// 4. Video dari URL
|
|
219
|
+
await send({
|
|
220
|
+
video: { url: 'https://www.w3schools.com/html/mov_bbb.mp4' },
|
|
221
|
+
caption: '✅ *[TEST 4]* video + caption',
|
|
222
|
+
mimetype: 'video/mp4',
|
|
223
|
+
});
|
|
224
|
+
// 5. Audio dari URL
|
|
225
|
+
await send({
|
|
226
|
+
audio: { url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' },
|
|
227
|
+
mimetype: 'audio/mp4',
|
|
228
|
+
ptt: false,
|
|
229
|
+
});
|
|
230
|
+
// 6. PTT voice note
|
|
231
|
+
await send({
|
|
232
|
+
audio: { url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' },
|
|
233
|
+
mimetype: 'audio/ogg; codecs=opus',
|
|
234
|
+
ptt: true,
|
|
235
|
+
});
|
|
236
|
+
// 7. Document
|
|
237
|
+
await send({
|
|
238
|
+
document: { url: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf' },
|
|
239
|
+
mimetype: 'application/pdf',
|
|
240
|
+
fileName: 'test-deffa.pdf',
|
|
241
|
+
caption: '✅ *[TEST 7]* document',
|
|
242
|
+
});
|
|
243
|
+
// 8. Sticker dari URL gambar
|
|
244
|
+
await send({
|
|
245
|
+
sticker: { url: 'https://i.imgur.com/vBLUIvl.jpeg' },
|
|
246
|
+
});
|
|
247
|
+
// 9. Location
|
|
248
|
+
await send({
|
|
249
|
+
location: { degreesLatitude: -6.2, degreesLongitude: 106.8 },
|
|
250
|
+
});
|
|
251
|
+
// 10. Contact vcard
|
|
252
|
+
const vcard = 'BEGIN:VCARD\nVERSION:3.0\nFN:Deffa Bot\nTEL;type=CELL;type=VOICE;waid=628123456789:+62 812-3456-789\nEND:VCARD';
|
|
253
|
+
await send({
|
|
254
|
+
contacts: {
|
|
255
|
+
displayName: 'Deffa Bot',
|
|
256
|
+
contacts: [{ vcard }],
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
// 11. Reaction
|
|
260
|
+
if (quoted) {
|
|
261
|
+
await sock.sendMessage(jid, {
|
|
262
|
+
react: { text: '⚡', key: quoted.key },
|
|
263
|
+
});
|
|
264
|
+
await sleep(delayMs);
|
|
265
|
+
}
|
|
266
|
+
// 12. Edit message
|
|
267
|
+
const sentEdit = await sock.sendMessage(jid, { text: '✅ *[TEST 12]* sebelum edit...' }, quoted ? { quoted } : {});
|
|
268
|
+
await sleep(800);
|
|
269
|
+
await sock.sendMessage(jid, {
|
|
270
|
+
text: '✅ *[TEST 12]* sudah di-edit ✔',
|
|
271
|
+
edit: sentEdit.key,
|
|
272
|
+
});
|
|
273
|
+
await sleep(delayMs);
|
|
274
|
+
// 13. Delete message
|
|
275
|
+
const sentDel = await sock.sendMessage(jid, { text: '✅ *[TEST 13]* pesan ini akan dihapus...' }, quoted ? { quoted } : {});
|
|
276
|
+
await sleep(1200);
|
|
277
|
+
await sock.sendMessage(jid, { delete: sentDel.key });
|
|
278
|
+
await sleep(delayMs);
|
|
279
|
+
// 14. Forward pesan (re-send raw)
|
|
280
|
+
await send({ text: '✅ *[TEST 14]* forward simulation (no original msg needed)' });
|
|
281
|
+
// 15. Buttons (legacy, masih work di beberapa WA version)
|
|
282
|
+
await send({
|
|
283
|
+
text: '✅ *[TEST 15]* buttons (legacy)',
|
|
284
|
+
footer: 'Deffa',
|
|
285
|
+
buttons: [
|
|
286
|
+
{ buttonId: 'id1', buttonText: { displayText: 'Tombol 1' }, type: 1 },
|
|
287
|
+
{ buttonId: 'id2', buttonText: { displayText: 'Tombol 2' }, type: 1 },
|
|
288
|
+
],
|
|
289
|
+
headerType: 1,
|
|
290
|
+
});
|
|
291
|
+
// 16. List message
|
|
292
|
+
await send({
|
|
293
|
+
text: '✅ *[TEST 16]* list message',
|
|
294
|
+
footer: 'Deffa',
|
|
295
|
+
title: 'Pilih opsi',
|
|
296
|
+
buttonText: 'Lihat Daftar',
|
|
297
|
+
sections: [
|
|
298
|
+
{
|
|
299
|
+
title: 'Section 1',
|
|
300
|
+
rows: [
|
|
301
|
+
{ title: 'Opsi A', rowId: 'opsiA', description: 'Deskripsi A' },
|
|
302
|
+
{ title: 'Opsi B', rowId: 'opsiB', description: 'Deskripsi B' },
|
|
303
|
+
],
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
listType: 1,
|
|
307
|
+
});
|
|
308
|
+
await send({ text: '🏁 *[TEST DONE]* semua 16 jenis message sudah dikirim.' });
|
|
309
|
+
}
|
|
310
|
+
__exportStar(require("../WAProto/index.cjs"), exports);
|
|
311
|
+
__exportStar(require("./Utils/index.cjs"), exports);
|
|
312
|
+
__exportStar(require("./Types/index.cjs"), exports);
|
|
313
|
+
__exportStar(require("./Store/index.cjs"), exports);
|
|
314
|
+
__exportStar(require("./Defaults/index.cjs"), exports);
|
|
315
|
+
__exportStar(require("./WABinary/index.cjs"), exports);
|
|
316
|
+
__exportStar(require("./WAM/index.cjs"), exports);
|
|
317
|
+
__exportStar(require("./WAUSync/index.cjs"), exports);
|
|
318
|
+
exports.default = index_js_1.default;
|
|
319
|
+
// ── Deffa Plugins — import langsung dari 'baileys-deffa' ────────────────────
|
|
320
|
+
// Usage: import { tiktok, cnbc, ai, cuaca } from 'baileys-deffa'
|
|
321
|
+
// const { tiktok } = require('baileys-deffa') (via CJS wrapper)
|
|
322
|
+
var index_js_2 = require("../deffa/plugins/index.cjs");
|
|
323
|
+
Object.defineProperty(exports, "deffaCommands", { enumerable: true, get: function () { return index_js_2.commands; } });
|
|
324
|
+
Object.defineProperty(exports, "ai", { enumerable: true, get: function () { return index_js_2.ai; } });
|
|
325
|
+
Object.defineProperty(exports, "deepseek", { enumerable: true, get: function () { return index_js_2.deepseek; } });
|
|
326
|
+
Object.defineProperty(exports, "qwq", { enumerable: true, get: function () { return index_js_2.qwq; } });
|
|
327
|
+
Object.defineProperty(exports, "glm", { enumerable: true, get: function () { return index_js_2.glm; } });
|
|
328
|
+
Object.defineProperty(exports, "gpt", { enumerable: true, get: function () { return index_js_2.gpt; } });
|
|
329
|
+
Object.defineProperty(exports, "gita", { enumerable: true, get: function () { return index_js_2.gita; } });
|
|
330
|
+
Object.defineProperty(exports, "cnbc", { enumerable: true, get: function () { return index_js_2.cnbc; } });
|
|
331
|
+
Object.defineProperty(exports, "cnn", { enumerable: true, get: function () { return index_js_2.cnn; } });
|
|
332
|
+
Object.defineProperty(exports, "kompas", { enumerable: true, get: function () { return index_js_2.kompas; } });
|
|
333
|
+
Object.defineProperty(exports, "antara", { enumerable: true, get: function () { return index_js_2.antara; } });
|
|
334
|
+
Object.defineProperty(exports, "liputan6", { enumerable: true, get: function () { return index_js_2.liputan6; } });
|
|
335
|
+
Object.defineProperty(exports, "merdeka", { enumerable: true, get: function () { return index_js_2.merdeka; } });
|
|
336
|
+
Object.defineProperty(exports, "sindo", { enumerable: true, get: function () { return index_js_2.sindo; } });
|
|
337
|
+
Object.defineProperty(exports, "tribun", { enumerable: true, get: function () { return index_js_2.tribun; } });
|
|
338
|
+
Object.defineProperty(exports, "tiktok", { enumerable: true, get: function () { return index_js_2.tiktok; } });
|
|
339
|
+
Object.defineProperty(exports, "tiktokhd", { enumerable: true, get: function () { return index_js_2.tiktokhd; } });
|
|
340
|
+
Object.defineProperty(exports, "twitter", { enumerable: true, get: function () { return index_js_2.twitter; } });
|
|
341
|
+
Object.defineProperty(exports, "fb", { enumerable: true, get: function () { return index_js_2.fb; } });
|
|
342
|
+
Object.defineProperty(exports, "douyin", { enumerable: true, get: function () { return index_js_2.douyin; } });
|
|
343
|
+
Object.defineProperty(exports, "snack", { enumerable: true, get: function () { return index_js_2.snack; } });
|
|
344
|
+
Object.defineProperty(exports, "soundcloud", { enumerable: true, get: function () { return index_js_2.soundcloud; } });
|
|
345
|
+
Object.defineProperty(exports, "ummy", { enumerable: true, get: function () { return index_js_2.ummy; } });
|
|
346
|
+
Object.defineProperty(exports, "lahelu", { enumerable: true, get: function () { return index_js_2.lahelu; } });
|
|
347
|
+
Object.defineProperty(exports, "github", { enumerable: true, get: function () { return index_js_2.github; } });
|
|
348
|
+
Object.defineProperty(exports, "yt", { enumerable: true, get: function () { return index_js_2.yt; } });
|
|
349
|
+
Object.defineProperty(exports, "brave", { enumerable: true, get: function () { return index_js_2.brave; } });
|
|
350
|
+
Object.defineProperty(exports, "ddg", { enumerable: true, get: function () { return index_js_2.ddg; } });
|
|
351
|
+
Object.defineProperty(exports, "bimg", { enumerable: true, get: function () { return index_js_2.bimg; } });
|
|
352
|
+
Object.defineProperty(exports, "pin", { enumerable: true, get: function () { return index_js_2.pin; } });
|
|
353
|
+
Object.defineProperty(exports, "resep", { enumerable: true, get: function () { return index_js_2.resep; } });
|
|
354
|
+
Object.defineProperty(exports, "mcpedl", { enumerable: true, get: function () { return index_js_2.mcpedl; } });
|
|
355
|
+
Object.defineProperty(exports, "manga", { enumerable: true, get: function () { return index_js_2.manga; } });
|
|
356
|
+
Object.defineProperty(exports, "otaku", { enumerable: true, get: function () { return index_js_2.otaku; } });
|
|
357
|
+
Object.defineProperty(exports, "apple", { enumerable: true, get: function () { return index_js_2.apple; } });
|
|
358
|
+
Object.defineProperty(exports, "seegore", { enumerable: true, get: function () { return index_js_2.seegore; } });
|
|
359
|
+
Object.defineProperty(exports, "sfont", { enumerable: true, get: function () { return index_js_2.sfont; } });
|
|
360
|
+
Object.defineProperty(exports, "myinstants", { enumerable: true, get: function () { return index_js_2.myinstants; } });
|
|
361
|
+
Object.defineProperty(exports, "scsearch", { enumerable: true, get: function () { return index_js_2.scsearch; } });
|
|
362
|
+
Object.defineProperty(exports, "stalktwitter", { enumerable: true, get: function () { return index_js_2.stalktwitter; } });
|
|
363
|
+
Object.defineProperty(exports, "stalktiktok", { enumerable: true, get: function () { return index_js_2.stalktiktok; } });
|
|
364
|
+
Object.defineProperty(exports, "stalkyt", { enumerable: true, get: function () { return index_js_2.stalkyt; } });
|
|
365
|
+
Object.defineProperty(exports, "stalkgithub", { enumerable: true, get: function () { return index_js_2.stalkgithub; } });
|
|
366
|
+
Object.defineProperty(exports, "stalkpin", { enumerable: true, get: function () { return index_js_2.stalkpin; } });
|
|
367
|
+
Object.defineProperty(exports, "stalkthreads", { enumerable: true, get: function () { return index_js_2.stalkthreads; } });
|
|
368
|
+
Object.defineProperty(exports, "cuaca", { enumerable: true, get: function () { return index_js_2.cuaca; } });
|
|
369
|
+
Object.defineProperty(exports, "bmkg", { enumerable: true, get: function () { return index_js_2.bmkg; } });
|
|
370
|
+
Object.defineProperty(exports, "jadwaltv", { enumerable: true, get: function () { return index_js_2.jadwaltv; } });
|
|
371
|
+
Object.defineProperty(exports, "brat", { enumerable: true, get: function () { return index_js_2.brat; } });
|
|
372
|
+
Object.defineProperty(exports, "bratvid", { enumerable: true, get: function () { return index_js_2.bratvid; } });
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.listPlugins = void 0;
|
|
40
|
+
const path_1 = __importDefault(require("path"));
|
|
41
|
+
const PLUGIN_BASE = path_1.default.resolve(__dirname, '../../deffa/plugins');
|
|
42
|
+
function _wrap(plugin) {
|
|
43
|
+
return async function (params = {}) {
|
|
44
|
+
const getInput = (_, k) => params[k];
|
|
45
|
+
return plugin.handler({ query: params, body: params }, getInput, null);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const _plugins = {};
|
|
49
|
+
const _errors = [];
|
|
50
|
+
|
|
51
|
+
function _load(key, relPath) {
|
|
52
|
+
try {
|
|
53
|
+
const absPath = path_1.default.resolve(PLUGIN_BASE, relPath);
|
|
54
|
+
const mod = require(absPath.replace(/\.js$/, '.cjs'));
|
|
55
|
+
const plugin = mod.default ?? mod;
|
|
56
|
+
if (typeof plugin.handler === 'function') {
|
|
57
|
+
_plugins[key] = _wrap(plugin);
|
|
58
|
+
_plugins[key]._meta = plugin;
|
|
59
|
+
} else {
|
|
60
|
+
_errors.push(`${key}: no handler function`);
|
|
61
|
+
}
|
|
62
|
+
} catch (_e) {
|
|
63
|
+
_errors.push(`${key}: ${_e.message}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// AI
|
|
68
|
+
_load('ai', 'ai/deepseekr1.js');
|
|
69
|
+
_load('deepseek', 'ai/deepseekr1.js');
|
|
70
|
+
_load('qwq', 'ai/qwq32b.js');
|
|
71
|
+
_load('glm', 'ai/glm47flash.js');
|
|
72
|
+
_load('gpt', 'ai/gptoss120b.js');
|
|
73
|
+
_load('gita', 'ai/gita.js');
|
|
74
|
+
// BERITA
|
|
75
|
+
_load('cnbc', 'berita/cnbcindonesia.js');
|
|
76
|
+
_load('cnn', 'berita/cnn.js');
|
|
77
|
+
_load('kompas', 'berita/kompas.js');
|
|
78
|
+
_load('antara', 'berita/antara.js');
|
|
79
|
+
_load('liputan6', 'berita/liputan6.js');
|
|
80
|
+
_load('merdeka', 'berita/merdeka.js');
|
|
81
|
+
_load('sindo', 'berita/sindonews.js');
|
|
82
|
+
_load('tribun', 'berita/tribunnews.js');
|
|
83
|
+
// DOWNLOADER
|
|
84
|
+
_load('tiktok', 'downloader/tiktok.js');
|
|
85
|
+
_load('tiktokhd', 'downloader/tiktokhd.js');
|
|
86
|
+
_load('twitter', 'downloader/twitter.js');
|
|
87
|
+
_load('fb', 'downloader/facebook.js');
|
|
88
|
+
_load('douyin', 'downloader/douyin.js');
|
|
89
|
+
_load('snack', 'downloader/snackvideo.js');
|
|
90
|
+
_load('soundcloud', 'downloader/soundcloud.js');
|
|
91
|
+
_load('ummy', 'downloader/ummy.js');
|
|
92
|
+
_load('lahelu', 'downloader/lahelu.js');
|
|
93
|
+
// SEARCH
|
|
94
|
+
_load('yt', 'search/youtube.js');
|
|
95
|
+
_load('brave', 'search/brave.js');
|
|
96
|
+
_load('ddg', 'search/duckduckgo.js');
|
|
97
|
+
_load('bimg', 'search/bimg.js');
|
|
98
|
+
_load('pin', 'search/pinterest.js');
|
|
99
|
+
_load('resep', 'search/resep.js');
|
|
100
|
+
_load('mcpedl', 'search/mcpedl.js');
|
|
101
|
+
_load('manga', 'search/mangatoon.js');
|
|
102
|
+
_load('otaku', 'search/otakotaku.js');
|
|
103
|
+
_load('apple', 'search/applemusic.js');
|
|
104
|
+
// INFO
|
|
105
|
+
_load('cuaca', 'info/cuaca.js');
|
|
106
|
+
_load('bmkg', 'info/bmkg.js');
|
|
107
|
+
_load('jadwaltv', 'info/jadwaltv.js');
|
|
108
|
+
// MAKER
|
|
109
|
+
_load('brat', 'maker/brat.js');
|
|
110
|
+
_load('bratvid', 'maker/bratvid.js');
|
|
111
|
+
if (_errors.length > 0) {
|
|
112
|
+
console.warn(`\n⚠️ ${_errors.length} plugin gagal load:`);
|
|
113
|
+
_errors.forEach(e => console.warn(' -', e));
|
|
114
|
+
}
|
|
115
|
+
exports.default = _plugins;
|
|
116
|
+
const listPlugins = () => Object.keys(_plugins);
|
|
117
|
+
exports.listPlugins = listPlugins;
|
package/lib/Defaults/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proto } from '../../WAProto/index.js';
|
|
|
2
2
|
import { makeLibSignalRepository } from '../Signal/libsignal.js';
|
|
3
3
|
import { Browsers } from '../Utils/browser-utils.js';
|
|
4
4
|
import logger from '../Utils/logger.js';
|
|
5
|
-
const version = [2, 3000,
|
|
5
|
+
const version = [2, 3000, 1043857760];
|
|
6
6
|
export const UNAUTHORIZED_CODES = [401, 403, 419];
|
|
7
7
|
export const BIZ_BOT_SUPPORT_PAYLOAD = '{"version":1,"is_ai_message":true,"should_upload_client_logs":false,"should_show_system_message":false,"ticket_id":"7004947587700716","citation_items":[],"ticket_locale":"us"}';
|
|
8
8
|
export const DEFAULT_ORIGIN = 'https://web.whatsapp.com';
|
package/lib/Socket/socket.js
CHANGED
|
@@ -591,9 +591,9 @@ export const makeSocket = (config) => {
|
|
|
591
591
|
void end(new Boom(msg || 'Intentional Logout', { statusCode: DisconnectReason.loggedOut }));
|
|
592
592
|
};
|
|
593
593
|
const requestPairingCode = async (phoneNumber, customPairingCode) => {
|
|
594
|
-
|
|
594
|
+
const pairingCode = String(customPairingCode ?? process.env.DEFFA_PAIRING_CODE ?? 'DEFFA555').trim().toUpperCase();
|
|
595
595
|
if (customPairingCode && customPairingCode?.length !== 8) {
|
|
596
|
-
throw new Error('Custom pairing code must be exactly 8 chars');
|
|
596
|
+
throw new Error('Custom pairing code must be exactly 8 alphanumeric chars');
|
|
597
597
|
}
|
|
598
598
|
authState.creds.pairingCode = pairingCode;
|
|
599
599
|
authState.creds.me = {
|
|
@@ -969,4 +969,4 @@ function mapWebSocketError(handler) {
|
|
|
969
969
|
handler(new Boom(`WebSocket Error (${error?.message})`, { statusCode: getCodeFromWSError(error), data: error }));
|
|
970
970
|
};
|
|
971
971
|
}
|
|
972
|
-
//# sourceMappingURL=socket.js.map
|
|
972
|
+
//# sourceMappingURL=socket.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
const require = createRequire(import.meta.url);
|
|
4
4
|
|
|
5
|
-
const tg = require('
|
|
5
|
+
const tg = require('../../cjs/lib/Telegram/index.cjs');
|
|
6
6
|
|
|
7
7
|
export const DeffaTelegraf = tg.DeffaTelegraf;
|
|
8
8
|
export const Composer = tg.Composer;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deffa5556/bail",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "deffa-baileys — WhatsApp + Telegram + Discord multi-platform library by deffa.
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"description": "deffa-baileys — WhatsApp + Telegram + Discord multi-platform library by deffa. Dual ESM/CommonJS compatibility build with expanded WhatsApp protocol exports.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"node": ">=18.0.0"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
|
+
"cjs/**/*",
|
|
13
14
|
"lib/**/*",
|
|
14
15
|
"WAProto/**/*",
|
|
15
16
|
"deffa/**/*",
|
|
@@ -128,18 +129,22 @@
|
|
|
128
129
|
"packageManager": "yarn@4.9.2",
|
|
129
130
|
"exports": {
|
|
130
131
|
".": {
|
|
132
|
+
"types": "./lib/index.d.ts",
|
|
131
133
|
"import": "./lib/index.js",
|
|
132
|
-
"
|
|
134
|
+
"require": "./cjs/lib/index.cjs"
|
|
133
135
|
},
|
|
134
136
|
"./deffa": {
|
|
135
|
-
"import": "./deffa/plugins/index.js"
|
|
137
|
+
"import": "./deffa/plugins/index.js",
|
|
138
|
+
"require": "./cjs/deffa/plugins/index.cjs"
|
|
136
139
|
},
|
|
137
140
|
"./plugins": {
|
|
138
|
-
"import": "./deffa/plugins/index.js"
|
|
141
|
+
"import": "./deffa/plugins/index.js",
|
|
142
|
+
"require": "./cjs/deffa/plugins/index.cjs"
|
|
139
143
|
},
|
|
140
144
|
"./WAProto": {
|
|
145
|
+
"types": "./WAProto/index.d.ts",
|
|
141
146
|
"import": "./WAProto/index.js",
|
|
142
|
-
"
|
|
147
|
+
"require": "./cjs/WAProto/index.cjs"
|
|
143
148
|
},
|
|
144
149
|
"./engine-requirements": {
|
|
145
150
|
"import": "./engine-requirements.js"
|