TextChannel object

client.on('channelCreate', async (channel) => { }); This eventhandler, gives a TextChannel object, or VoiceChannel object, the question is, how do i know who created the channel?
8 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Mark
Mark8mo ago
audit logs would tell you who created the channel
⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟
and how do i use it? like is it a method, property? other object
d.js docs
d.js docs8mo ago
event (event) Client#guildAuditLogEntryCreate Emitted whenever a guild audit log entry is created.
⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟
i cant understand this is logs
any
any8mo ago
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
any
any8mo ago
use channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelCreate }) and find the channel
⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟ ⃟
thank you that was really helpful