Giter Site home page Giter Site logo

Comments (1)

Wifus avatar Wifus commented on July 23, 2024

By checking out animalUtil.js:116:39, the top of the error stack trace, it is clear that the cpatreon property of the animals object is undefined.

let patreonPercent = animals.cpatreon[0] + animals.patreon[0];

Looking at where animals is initialized at the top of animalUtil.js, it seems like animals gets its data from owo-animals.json.

let animals;
try {
        animals = require('../../../../../tokens/owo-animals.json');
} catch (err) {
        console.error('Could not find owo-animals.json, attempting to use ./secret file...');
        animals = require('../../../../secret/owo-animals.json');
        console.log('Found owo-animals.json file in secret folder!');
}

Based on the other issues you have opened, it seems you've just copy pasted the owo-animals.json file from the secret folder into the tokens folder. This file is incomplete on purpose and does not include the most of the animal tiers, including cpatreon. This is the source of your issue. It can be fixed by either adding the missing tiers to owo-animals.json or removing the logic for those extra tiers (by commenting out lines 89-148 and 180-199 and fixing the if statements).

It's unlikely that somebody will be able to help you out with every issue like this you come across. Not many people have tried hosting their own instance of the bot. There are many things in the codebase excluded from the public repository. Also keep in mind the license this code is subject to. Commercial use of derivatives of the code is strictly prohibited.

All that being said have fun tinkering with the codebase, there are a lot of interesting things in here. If you run into any more issues, then giving a bit more information such as what you are trying to do or what you've done to try to fix the issue would be appreciated. I am not promising to hold your hand like I've done here though.

from discord-owo-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.