GithubHelp home page GithubHelp logo

cooper-1's Introduction

Cooper (The Coop's Discord Bot)

To run:

<<<<<<< HEAD TODO: Clean this README up.

heroku pg:psql --app cooperchickenbot

CREATE TABLE open_trades( id SERIAL PRIMARY KEY, trader_id VARCHAR, trader_username VARCHAR, offer_item VARCHAR, receive_item VARCHAR, offer_qty int, receive_qty int );

CREATE TABLE items( id SERIAL PRIMARY KEY, item_code VARCHAR, quantity int, owner_id VARCHAR, CONSTRAINT fk_owner_id FOREIGN KEY(owner_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE election_votes( id SERIAL PRIMARY KEY, candidate_id VARCHAR, voter_id VARCHAR, time int, CONSTRAINT fk_voter_id FOREIGN KEY(voter_id) REFERENCES users(discord_id) ON DELETE CASCADE, CONSTRAINT fk_candidate_id FOREIGN KEY(candidate_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE candidates( id SERIAL PRIMARY KEY, campaign_msg_link VARCHAR, candidate_id VARCHAR, CONSTRAINT fk_candidate_id FOREIGN KEY(candidate_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE past_commanders( id SERIAL PRIMARY KEY, last_served int, candidate_id VARCHAR, CONSTRAINT fk_candidate_id FOREIGN KEY(candidate_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE structures( id SERIAL PRIMARY KEY, structure_code VARCHAR, health int, level int, owner_id VARCHAR, CONSTRAINT fk_owner_id FOREIGN KEY(owner_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE skills( id SERIAL PRIMARY KEY, crafting int, magic int, mining int, woodcutting int, fishing int, hunting int, player_id VARCHAR, CONSTRAINT fk_player_id FOREIGN KEY(player_id) REFERENCES users(discord_id) ON DELETE CASCADE );

CREATE TABLE events( id SERIAL PRIMARY KEY, event_code VARCHAR UNIQUE NOT NULL, last_occurred bigint );

CREATE TABLE chicken( id SERIAL PRIMARY KEY, attribute VARCHAR UNIQUE NOT NULL, value VARCHAR );

ALTER TABLE users ADD COLUMN email VARCHAR;

CREATE TABLE temp_messages( id SERIAL PRIMARY KEY, message_id VARCHAR, expiry_time int );

ALTER TABLE temp_messages ADD COLUMN message_link VARCHAR;

ALTER TABLE temp_messages DROP COLUMN message_id;

  1. Clone repo
  2. npm i
  3. Create .env file in root
  4. Add DISCORD_TOKEN=TOKEN line to .env
  5. Add DATABASE_URL=DATABASE_URL line to .env
  6. npm run shallowBot (or full bot).

7c90723f5cfa4f70f0f323825ffdb9b66773723b

cooper-1's People

Contributors

lmf-git avatar dreadedhippy avatar circle601 avatar inklingboiii avatar a-ron-ron avatar astrodev18 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.