Arcitezz
Arcitezz

Reputation: 33

How to get channel ID through bot - Discord.js

I'm trying to get the channel ID of where the command was sent so that I can use that ID to delete the channel. I've been looking in the Discord.js doc's but can't seem to figure it out.

Upvotes: 0

Views: 384

Answers (1)

Jannik Schmidtke
Jannik Schmidtke

Reputation: 1247

It is simply

message.channel.id

message.channel is your current text channel and id is the ID of it.

Upvotes: 1

Related Questions