GithubHelp home page GithubHelp logo

blairhackclub / scrappy Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 3.0 28 KB

Discord bot that manages Blair Hack Club's #scrapbook! Inspired by https://github.com/hackclub/scrappy.

Home Page: https://blair.hackclub.com

JavaScript 98.89% Dockerfile 1.11%
hacktoberfest

scrappy's Introduction

Scrappy

Work in progress!

How to start

Airtable

Setup an AirTable.

Add a Users and Scraps table.

Refer to AirTable Integration section and copy the field names.

Discord Bot

Clone this repository into a desired folder.

git clone https://github.com/blairhackclub/scrappy/ SCRAPPYFOLDERNAME

Install dependencies.

npm i

Add a .env file with the following environment variables.

AIRTABLE_BASE_ID=found in AirTable URL
NEXT_PUBLIC_AIRTABLE_API_KEY=found in AirTable personal settings
CLIENT_ID=found in Discord Developer Applications page
TOKEN=found in Discord Developer Applications page
GUILD_ID=found in Discord
SCRAPBOOK_CHANNEL_ID=found in Discord

Run the bot.

npm start

Website

Clone Blair Hack Club's site.

git clone https://github.com/blairhackclub/site-v2 SITEFOLDERNAME

Install dependencies.

npm i

Isolate scrapbook feature as needed. Blair Hack Club scrapbook uses the pages/scrapbook folder, lib folder, public/assets folder, components folder, and .env (including all the required Next directories).

Add a .env file with the following environment variables. WORK IN PROGRESS

NEXT_PUBLIC_AIRTABLE_BASE_ID=found in AirTable URL
NEXT_PUBLIC_AIRTABLE_API_KEY=found in AirTable personal settings

Run the site.

npm run dev

Airtable integration

This bot integrates with an Airtable base to store and manage data. The base should have the following tables with the following fields:

  • Scraps table
    • Scrap ID: Autonumber
    • Created time: Created time
    • Discord Message ID: Single line text
    • Discord Thread ID: Single line text
    • Description: Long text
    • Attachments: Attachment
    • Tags: Multiple select (not implemented yet)
    • Mentions: Link to Users, Allow linking to multiple records (not implemented yet)
    • User: Link to Users
    • User Record ID: Lookup, User, Record ID
    • Username (from User): Lookup, User, Username
    • Avatar (from User): Lookup, User, Avatar
  • Users table
    • Username: Single line text
    • Record ID: Formula, RECORD_ID() (optional)
    • Discord UID: Single line text
    • Avatar: Attachment,
    • GitHub User: Single line text (not implemented yet)
    • Website: Single line text (not implemented yet)
    • Scraps: Link to Scraps, Allow linking to multiple records
    • Mentions: Link to scraps, Allow linking to multiple records (not implemented yet)

Read more about Airtable's API: https://airtable.com/api

scrappy's People

Contributors

linkai101 avatar tinuh avatar matthewstanciu avatar internetramen avatar

Stargazers

SpellCore avatar  avatar Sam Poder avatar  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.