'Disabling bot in the specific servers
I want to disable my bot in specific server(s) and I want to put it in my command if statements. How to do it?
if (!message.content.startsWith(prefix) /* || Disabling the specific servers here */) return;
Solution 1:[1]
Check the guild ID
if (!message.content.startsWith(prefix) || ["guildId1", "guildId2"].includes(message.guildId)) return;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MrMythical |
