As generirati invitation to the server knowing its ID?

How to use the bot so I can generate an invitation to the server where it is, server ID and bring this invitation to the chat
April 19th 20 at 12:07
1 answer
April 19th 20 at 12:09
Take any channel and thinking method `createInvite()` on it. https://discord.js.org/#/docs/main/stable/search?q...
The bot gave an error when you try to display it in the channel was such a code
client.channels.get(id).createInvite().then(inv=>msg.channel.send(inv.url))
Always output instead of a reference [object Promise] - judge_Kreiger commented on April 19th 20 at 12:12
fill the catch, look spits it a mistake `.catch(console.error);` - shaina_Dav commented on April 19th 20 at 12:15

Find more questions by tags DiscordNode.js