Giter Club home page Giter Club logo

utopia's Introduction

Utopia Rewrite

Complete rewrite of the Utopia Bot using MongoDB and TypeScript (instead of JSON files and JavaScript... hell, that was a mess).

How to get a Fork/Copy of the Repository to work

Requirements:

  • Node.js and npm (I use Node v12.16.0 and npm v6.14.3)
  • MongoDB
  • TypeScript (I use TypeScript 3.8.3)

Optional:

  • webpack (used for compiling in production, I use v4.16.0)
  • For the imageplotting:
    • Python 3+ and pip (I use Python 3.6.8 and pip 19.3.1)
    • Pillow (Python Image library, I used v6.2.1)
    • Requests (I use 2.22.0)

A more detailed list with all additional dev-dependencies and more can be found in the files package.json and package-lock.json (Node) and requirements.txt (Python)

First of all you should rename the example-config.json in /src/static/ to config.json and fill out the fields. The names are mostly self-explainatory. If you don't know what you should do with the dbl object, leave it as it is. It's only needed for the voting streaks.

After that run npm install in the command line.

You have two options when compiling the code:

  • Use webpack and generate one bundled up file, which contains all the code (hard to debug runtime errors, so I suggest not using that, this is for me when deploying the app). Before you compile it, you need to create a second config file called config.prod.json in the same folder as config.json. For testing you can just paste the data of your config.json in the config.prod.json. After you have done that, you can compile and run the project using webpack && node dist/bundle.js.

  • Use the default TypeScript compiler: This will compile each TypeScript file to a corresponding JavaScript file (and a definition file *.d.ts but you can ignore these). This should not be used during production but makes it much easier to debug when testing. In order to get that, run tsc && node dist/index.js.
    Note: When debugging, the errors will be thrown in the JavaScript files so you have to look there and afterwards edit the TypeScript files

Another Note when editing the Python files: The main files are in /imageplotting/ but the version the compiled programm acesses is in /dist/ as well (it's marked as Generated for the GitHub linguist and the whole /dist folder won't get pushed). This means: If you edit the Python files, do this in /imageplotting/ and copy them into /dist/ before running the program.

utopia's People

Contributors

blitzwolfz avatar djj05 avatar jonathanthezero avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

utopia's Issues

Update bot to Discordjs v12

Since discord decided to change their API on a whim, v11 will now soon be deprecated in favour of v12. Should make a new branch and start working on that after current government features are completed.

Duels still bugged

Some known bugs include sometimes users don't get a refund or lose more than they had before

v2 bugs for mines

  • Fix mine dig time bug
  • Fix mine 0 minereturn variable bug
  • Add some commenting to mine file

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.