Androz2091 / Androz2091/discord-logs

voiceChannelJoin not working

Đang mở
#161 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
239
Fork
22
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# The following code is not working:

```js
const client = require('../index');
const { MessageEmbed } = require('discord.js');
const { server_log } = require('.//../channel.json');

// Joined VC
client.on('voiceChannelJoin', (member, channel) => {

const LogChannel = client.channels.cache.get(server_log);
const VCJoined = new MessageEmbed()
.setTitle('Voice Channel Joined')
.setColor('#2F3136')
.setDescription(member.user.tag + ' joined ' + `${channel}` + '!');

return LogChannel.send({
embeds: [VCJoined],
});

});
```

# I am calling this file through the following code:

```js

require('./events/voiceChannelJoin');

```

# But Powershell gave the following output instead:

```powershell

node:internal/modules/cjs/loader:936
throw err;
^

Require stack:
- F:\Discord bot packages\3rd\index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object. (F:\Discord bot packages\3rd\index.js:32:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'F:\\Discord bot packages\\3rd\\index.js' ]
}

```

# Anyone please help

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.