I currently am working in a script that's automatically updated, and not called by any command or message. Thus, I have no message variable to call message.guild.id with. I am making a bot for one specific server, and I need my code to edit a specific channel within that server, thus needing the server ID. I tried
let server = client.guilds.get('<guild id>'), channel;
and using the server variable to find the specific channel I want it to edit. This however gives an error. Am I missing any dependencies, or is there an easier way to do this?
Thanks in advance!
client.guilds.get does not exist anymore. Use client.guilds.cache.get
let server = client.guilds.cache.get('<guild id>')