mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 12:23:09 +02:00
fix: API not working on Windows
This commit is contained in:
parent
9936b05fbb
commit
f74069deb6
@ -135,6 +135,7 @@ module.exports = client => {
|
||||
const path = file
|
||||
.substring(0, file.length - 3) // remove `.js`
|
||||
.substring(dir.length) // remove higher directories
|
||||
.replace(/\\/g, '/') // replace `\` with `/` because Windows is stupid
|
||||
.replace(/\[(\w+)\]/gi, ':$1') // convert [] to :
|
||||
.replace('/index', '') || '/'; // remove index
|
||||
const route = require(file);
|
||||
|
Loading…
Reference in New Issue
Block a user