Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Failed to walk in help.js #17

Open
writeblankspace opened this issue Mar 12, 2021 · 5 comments
Open

Failed to walk in help.js #17

writeblankspace opened this issue Mar 12, 2021 · 5 comments
Labels
bug Something isn't working in progress Currently being worked on inactive Error makes the bot inactive unknown fix The bug may not be caused by code
Milestone

Comments

@writeblankspace
Copy link
Owner

writeblankspace commented Mar 12, 2021

The js object in help.js makes a problem, so that DBD.js cannot access the file because it contains javascript that isn't its own. I'm asking the support server for now.

// module.exports command etc etc

// the javascript function
const helpFunc = {
    module: (number) => {
        return `$title[
            $toLocaleUppercase[$getObjectProperty[a${number}name]] | Commands
            ]
    
            $description[
                \`\`\`$getObjectProperty[a${number}commands]\`\`\`
                Visit the Study Group [website\\](https://akis.glitch.me) or check out the [docs\\](https://akis.glitch.me/docs.html).
            ]`
    },
    moduleList: (emoji, number) => {
        return `
        $addField[${emoji} $toLocaleUppercase[$getObjectProperty[a${number}name]]; \`$getObjectProperty[prefix]help $getObjectProperty[a${number}name]\`;yes]
        `
    }
}
@writeblankspace writeblankspace added this to the Code re-write milestone Mar 12, 2021
@writeblankspace writeblankspace added bug Something isn't working in progress Currently being worked on unknown fix The bug may not be caused by code labels Mar 12, 2021
@writeblankspace writeblankspace pinned this issue Mar 14, 2021
@writeblankspace
Copy link
Owner Author

Possible fix using $djsEval

@writeblankspace
Copy link
Owner Author

According to blox,
image

@writeblankspace
Copy link
Owner Author

writeblankspace commented Mar 15, 2021

Possible fix

May be the same fix as wink but that has its own problems too.

How to fix

  • server.js
    module.exports = {func};
  • command
    const {func} = require('../../server.js');

The above causes an error:
cannot find module /environment

How to fix

  • do npm install environment
    this causes an error about python
  • do `npm install python
    this causes an error about python
  • declare variables in the module.exports

This follows all rules for const. For more info, check your course on CodeCademy maybe.

@writeblankspace writeblankspace added enhancement New feature or request inactive Error makes the bot inactive labels Mar 15, 2021
@writeblankspace
Copy link
Owner Author

Trying the possible fix stated above may cause the bot to go inactive.

@writeblankspace writeblankspace removed the enhancement New feature or request label Mar 15, 2021
@writeblankspace
Copy link
Owner Author

const func = require('public/server');
module.exports = {
    myId: "690173341104865310", 
    sampleFunction: function(text, moreText) {
        return `<@\$authorID> I'm returning ${text} and ${moreText} from func.sampleFunction`
    },
}

still doesn't work smh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working in progress Currently being worked on inactive Error makes the bot inactive unknown fix The bug may not be caused by code
Projects
None yet
Development

No branches or pull requests

1 participant