!" 𝑱𝒂𝒎𝒆𝒔__
!" 𝑱𝒂𝒎𝒆𝒔__
Explore posts from servers
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
this :
const app = require('express').Router();
const botsdata = require("../database/models/botlist/bots.js");

app.get("/", async (req,res) => {
res.render("index.ejs", {
bot: global.Client,
path: req.path,
config: global.config,
user: req.isAuthenticated() ? req.user : null,
req: req,
botdata: await botsdata.find(),
roles:global.config.server.roles,
channels: global.config.server.channels
})
})

module.exports = app;
const app = require('express').Router();
const botsdata = require("../database/models/botlist/bots.js");

app.get("/", async (req,res) => {
res.render("index.ejs", {
bot: global.Client,
path: req.path,
config: global.config,
user: req.isAuthenticated() ? req.user : null,
req: req,
botdata: await botsdata.find(),
roles:global.config.server.roles,
channels: global.config.server.channels
})
})

module.exports = app;
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
this :
app.engine("vcodes-xyz", ejs.renderFile);
app.engine("vcodes-xyz", ejs.renderFile);
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
I have sent you the route & renderTemplate as you requested
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
What should I send you the index.js or the server.js?
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
I have sent the code render
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Okay, what should I do?
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
const renderTemplate = async (res, req, template, data = {}) => {
const baseData = {
bot: client,
path: req.path,
_token: req.session['_token'],
user: req.isAuthenticated() ? req.user : null
};
res.render(path.resolve(`${templateDir}${path.sep}${template}`), Object.assign(baseData, data));
};
const renderTemplate = async (res, req, template, data = {}) => {
const baseData = {
bot: client,
path: req.path,
_token: req.session['_token'],
user: req.isAuthenticated() ? req.user : null
};
res.render(path.resolve(`${templateDir}${path.sep}${template}`), Object.assign(baseData, data));
};
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Could you please show me how to do this?
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
How can I fix this error?
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
As soon as I log in
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
In the server.js here it is: https://pastecord.com/ilapatamez.js
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Hello @Lioness100 sorry I was busy. Here is the index.js
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Which code do you want, because I don't really understand
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Do you want to see this code ?
app.get("/login", (req, res, next) => {

if (req.session.backURL) {
req.session.backURL = req.session.backURL;
} else if (req.headers.referer) {
const parsed = url.parse(req.headers.referer);
if (parsed.hostname === app.locals.domain) {
req.session.backURL = parsed.path;
}
} else {
req.session.backURL = "/";
}
next();
},
app.get("/login", (req, res, next) => {

if (req.session.backURL) {
req.session.backURL = req.session.backURL;
} else if (req.headers.referer) {
const parsed = url.parse(req.headers.referer);
if (parsed.hostname === app.locals.domain) {
req.session.backURL = parsed.path;
}
} else {
req.session.backURL = "/";
}
next();
},
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
Here
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
On the code Javascript & notified with this
<%
//code
%>
<%
//code
%>
74 replies
SIASapphire - Imagine a framework
Created by !" 𝑱𝒂𝒎𝒆𝒔__ on 1/2/2023 in #discordjs-support
Error Dashboard
74 replies