Giter Club home page Giter Club logo

poynt's Introduction

POYNT

A discord bot that adds interactive commands and economy to a server.

As the admin of a server, you can create, stop, end customized polls that users can bet.

Create an achievement store with roles that users can buy with earned points.

Requirements

  1. Docker
  2. python 3.9.4 or anaconda

Setting up the project locally

Setting up env file:

  1. Create a file called .env in the root directory.
  2. Add the following key value pairs:
    • DISCORD_TOKEN={discord_token}. The discord token created in the discord dev portal.
    • DISCORD_GUILD={discord_guild}. The discord guild name.
    • DB_USERNAME={db_username}. The username to create when the db instance gets created.
    • DB_PASSWORD={db_password}. The password to create when the db instance gets created.
    • DB_HOST={db_host}. The db host, ideally 127.0.0.1 or localhost since it will be running in the same instance as the bot.
    • DB_PORT={db_port}. The db port, ideally 27017 since it is MongoDB's default port.

Setting up python

If anaconda is installed:

  1. Run conda env create -f environment.yml in the root directory. This will install the required libraries and set up the environment.
  2. Run source activate poynt to activate the virtual environment.

If python 3.9.4 is installed:

NOTE: python command can be python3 or python3.9 depending on machine.

  1. Run python -m pip install virtualenv to install virtualenv library.
  2. Run python -m venv {env_name} where {env_name} is the name of the environment.
  3. Run source activate {env_name}/bin/activate to activate the virtual environment.
  4. Run pip -r install requirements.txt to install the required libraries.

Setting up MongoDB

  1. Run docker-compose build to download an image of MongoDB and setup the settings.
  2. Run mkdir db or create a directory called db so the docker container can hook it as a volume. This will be the directory where the db stores the files.

Running the project locally

After following through the setup part, run the following:

  1. Run docker-compose up -d to start the container containing the MongoDB instance.
  2. Run python bot.py to start the discord bot.
  3. Once the following is running, the following message should appear to the console:
    • {discord_guild} has connected to Discord!
  4. Now add the discord bot application to a server, using the authorization url.
  5. Type $help to learn about the commands and play with the bot.

Link to bot

Add bot to your server

Contributors

poynt's People

Contributors

ksyeo1010 avatar paulyeon avatar

Watchers

 avatar

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.