qqbot/bin/channel-core/base.js
2022-06-02 00:50:48 +08:00

17 lines
577 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { createOpenAPI, createWebsocket } from 'qq-guild-bot';
const testConfig = {
appID: '102011802', // 申请机器人时获取到的机器人 BotAppID
token: 'YPwwxVTwbOy9ULfvsKpmax2PC4xXr74x', // 申请机器人时获取到的机器人 BotToken
intents: ['GUILD_MESSAGES', 'MESSAGE_AUDIT'], // 事件订阅,用于开启可接收的消息类型
sandbox: true, // 沙箱支持可选默认false. v2.7.0+
};
// 创建 client
export const client = createOpenAPI(testConfig);
// 创建 websocket 连接
export const ws = createWebsocket(testConfig);