check if channel id is in guild id
Help pls
I want to check if channel id is in guild id without running a command
node = v18.13.0
djs = 14.8.0
My code (Dose not work (its for a command but i want it to run without a command))
10 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Hello?
What do you mean by "Dose not work"?
I found the code on stack Overflow and I think it's meant to be ran in a command file not a on-demand file found the code on stack Overflow and I think it's meant to be ran in a command. I want to run it every 10 seconds not from a command.
As long as you have access to a ready Client instance, it doesn't matter where the code goes since it doesn't rely on any Interactions
when I run it this happens
That means
guild
is null
• The provided id is incorrect (copy role ids from context menus, not message mentions)
• The client does not have this structure cached (try fetching instead)
• The client is not yet ready (move the code into any event listener callback)
I the the gild this way
const guild = client.guilds.resolve(guildId);
resolve
returns null
when one of these things occurs ^