'include one ejs file in another as if it was pasted in it
i have two ejs files(in same dir index.ejs && window.ejs).
i tried to include window in index and use function that is defined in window and it wont work. but when i paste window.ejs content in index instead of
<%- include("./window.ejs")%> it suddenly starts working.
to make problem apparent i don't have error like "functinName is not decleared","functionName was not recoginzed".
i also tryed ejs tags with "=","" but still no result
Solution 1:[1]
If using message based commands based on the client#messaageCreate event, the easy approach is to assert when guildOnly is set true, that there's message?.guild exists with:
if (command.guildOnly && !message.guild) {
return
}
When using slash commands you can directly register guild slash commands. Or when creating global slash commands, you can set channel_types in the options param that channel_types to only be shown in guilds
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 | Jason |
