将`e.bot`更改为不可枚举属性

将`e.bot`更改为不可枚举属性,防止在控制台打印`e`的时候打印出一堆属性,更好的找到有用信息

Signed-off-by: 椰羊 <746659424@qq.com>
This commit is contained in:
椰羊 2023-04-24 09:16:10 +00:00 committed by Gitee
parent 23b194c6a7
commit 2023faedb4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 1 deletions

View File

@ -158,7 +158,9 @@ class PluginsLoader {
* @param e icqq Events * @param e icqq Events
*/ */
async deal (e) { async deal (e) {
e.bot = Bot Object.defineProperty(e, 'bot', {
value: Bot
})
/** 检查频道消息 */ /** 检查频道消息 */
if (this.checkGuildMsg(e)) return if (this.checkGuildMsg(e)) return
/** 检查黑白名单 */ /** 检查黑白名单 */