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 toolkit14mo 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
Mark14mo ago
audit logs would tell you who created the channel
C⁶H¹²O⁶
C⁶H¹²O⁶OP14mo ago
and how do i use it? like is it a method, property? other object
d.js docs
d.js docs14mo ago
event (event) Client#guildAuditLogEntryCreate Emitted whenever a guild audit log entry is created.
C⁶H¹²O⁶
C⁶H¹²O⁶OP14mo ago
i cant understand this is logs
unnreaal
unnreaal14mo 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.
unnreaal
unnreaal14mo ago
use channel.guild.fetchAuditLogs({ type: AuditLogEvent.ChannelCreate }) and find the channel
C⁶H¹²O⁶
C⁶H¹²O⁶OP14mo ago
thank you that was really helpful
Want results from more Discord servers?
Add your server