Obtenha servidor por id discord.js

let server = message.guild.id // ID of the guild the message was sent in
let channel = message.channel.id // ID of the channel the message was sent in
Undefined