/source/
This commit is contained in:
parent
f828384dba
commit
329d36a878
|
|
@ -34,7 +34,7 @@ export async function handleGameStart(msg: Message) {
|
||||||
|
|
||||||
let game
|
let game
|
||||||
try {
|
try {
|
||||||
game = await import(`/command/${name}`)
|
game = await import(`/source/${name}`)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setStatus(msgId, "error")
|
setStatus(msgId, "error")
|
||||||
addOutput(msgId, `Error: ${err.message ? err.message : err}`)
|
addOutput(msgId, `Error: ${err.message ? err.message : err}`)
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ app.use("*", async (c, next) => {
|
||||||
return next()
|
return next()
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get("/command/:name", async c => {
|
app.get("/source/:name", async c => {
|
||||||
const name = c.req.param("name")
|
const name = c.req.param("name")
|
||||||
const path = commandPath(name)
|
const path = commandPath(name)
|
||||||
if (!path) return c.text("Command not found", 404)
|
if (!path) return c.text("Command not found", 404)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user