{"id":21221027,"url":"https://github.com/mollybeach/token-gating-discord-bot-api","last_synced_at":"2026-05-18T02:12:20.401Z","repository":{"id":262901527,"uuid":"865533399","full_name":"mollybeach/token-gating-discord-bot-api","owner":"mollybeach","description":"This project involves a discord bot that curates access to a discord server based on verified user funds of specific token(s). The discord bot interfaces with a smart contract and accounts for user's relevant token holdings upon registration. This information is then stored onto a db using the serverless api where updated data entries are made base","archived":false,"fork":false,"pushed_at":"2024-11-16T02:39:48.000Z","size":8841,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T04:38:20.253Z","etag":null,"topics":["discord-bot","nextjs","serverless","thirdweb","walletconnect"],"latest_commit_sha":null,"homepage":"https://mollybeach.github.io/token-gating-discord-bot-api/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mollybeach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-30T17:28:06.000Z","updated_at":"2025-07-15T17:24:47.000Z","dependencies_parsed_at":"2024-11-14T23:21:04.276Z","dependency_job_id":"abb28415-69ad-42e0-8b2d-e4aa7156be47","html_url":"https://github.com/mollybeach/token-gating-discord-bot-api","commit_stats":null,"previous_names":["mollybeach/token-gating-discord-bot-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mollybeach/token-gating-discord-bot-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mollybeach%2Ftoken-gating-discord-bot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mollybeach%2Ftoken-gating-discord-bot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mollybeach%2Ftoken-gating-discord-bot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mollybeach%2Ftoken-gating-discord-bot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mollybeach","download_url":"https://codeload.github.com/mollybeach/token-gating-discord-bot-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mollybeach%2Ftoken-gating-discord-bot-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274476917,"owners_count":25292748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-bot","nextjs","serverless","thirdweb","walletconnect"],"created_at":"2024-11-20T22:15:22.659Z","updated_at":"2026-05-18T02:12:15.369Z","avatar_url":"https://github.com/mollybeach.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Token Gating Discord Bot API\n\nThis project involves a discord bot that curates access to a discord server based on verified user funds of specific token(s). The discord bot interfaces with a smart contract and accounts for user's relevant token holdings upon registration. This information is then stored onto a db using the serverless api where updated data entries are made based on a moralis connected webhook from respective smart contract.\n\n## Features\n\n- Serverless API\n- Next.js Client\n- Smart Contract\n- WalletConnect\n- Thirdweb\n\n# VS Code Remote Development\n\nVisual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. You can:\n\nNo source code needs to be on your local machine to get these benefits. \\* Each extension in the Remote Development extension pack can run commands and other extensions directly inside a container, in WSL, or on a remote machine so that everything feels like it does when you run locally.\n\n### Prerequisites\n\nPlease ensure [Visual Studio Code](https://code.visualstudio.com/) is installed on your computer. After installing, you will need to install the [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack).\n\n### Setup\n\nPlease see instructions [here](https://code.visualstudio.com/docs/remote/remote-overview).\n\n# Serverless Framework\n\n## Test Offline\n\n```\n# Run serverless framework without a cloud environment\nsls offline\n```\n\n\n## Configure Serverless Framework\n\n```\n# Configure dev credentials\nsls config credentials --provider aws --profile token-gate-dev --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYser\n\n# Configure test credentials\nsls config credentials --provider aws --profile token-gate-test --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYser\n\n# Configure production credentials\nsls config credentials --provider aws --profile token-gate-prod --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEYser\n```\n\n## Deploy Serverless Functions\n\n```\n# Deploy dev services\nsls deploy --stage dev\n\n# Deploy test services\nsls deploy --stage test\n\n# Deploy prod services\nsls deploy --stage prod\n```\n\n## Usage of Serverless functions\n\n```\n~Offline Serverless Endpoints~\n\n# Discord Bot | users:\nhttp://localhost:3009/users - GET\nhttp://localhost:3009/users/${id} - GET\nhttp://localhost:3009/users/${id} - PUT\nhttp://localhost:3009/users - POST\n\n#Discord Bot | tokens:\nhttp://localhost:3009/tokens - GET\nhttp://localhost:3009/tokens/${id} - GET\nhttp://localhost:3009/tokens/${id} - PUT\n\n# Moralis Webhook:\nhttp://localhost:3009/transfers - POST\n```\n# Project Setup\nTo run this project, you will need to:\nThe client folder name has been changed to docs to run on github pages\ninstall all dependencies for both the server and client\nstart the server and client\n```\ncd src \nnpm run project\n```\n# Run Project\nTo install all dependencies and start the project:\nIn a terminal window at the root of the project,\nRun the following command:\n```\nnpm run client\n```\n# View Project\nIn your browser, navigate to:\nFor Server: \nhttp://localhost:3009/\nFor Client:\nhttp://localhost:3000/\n\n# Project Structure\n```\ntoken-gating-discord-bot-api/\n├── .devcontainer/\n│   ├── devcontainer.json\n│   ├── docker-compose.yml\n│   └── Dockerfile\n├── .git/\n├── client/\n│   ├── components/\n│   │   └── SignIn.tsx\n│   ├── pages/\n│   │   ├── api/\n│   │   │   ├── auth/\n│   │   │   │   └── [...nextauth].tsx\n│   │   │   ├── grant-role.tsx\n│   │   │   ├── message.tsx\n│   │   │   ├── tokens.tsx\n│   │   │   ├── update-roles.tsx\n│   │   │   └── users.tsx\n│   │   ├── _app.tsx\n│   │   └── index.tsx\n│   ├── public/\n│   │   ├── favicon.ico\n│   │   └── thirdweb.svg\n│   ├── styles/\n│   │   ├── globals.css\n│   │   └── Home.module.css\n│   ├── .babelrc\n│   ├── .env\n│   ├── .eslintrc.json\n│   ├── .gitignore\n│   ├── LICENSE.md\n│   ├── next-env.d.ts\n│   ├── next.config.js\n│   ├── package-lock.json\n│   ├── package.json\n│   ├── README.md\n│   └── tsconfig.json\n├── doc/\n│   ├── doc-filelist.js\n│   ├── doc-script.js\n│   └── doc-style.css\n├── ex/\n│   ├── Dockerfile\n│   ├── mongo-init.js\n│   ├── mongoose-users.ts\n│   ├── serverless-draft.yml\n│   └── users.ts\n├── infrastructure/\n│   ├── aws/\n│   │   ├── .gitignore\n│   │   ├── .terraform.lock.hcl\n│   │   ├── backend.tfvars\n│   │   ├── fix_terraform_dns_resolution.sh\n│   │   ├── infrastructure.tfvars\n│   │   ├── main.tf\n│   │   ├── outputs.tf\n│   │   ├── provider.tf\n│   │   └── variables.tf\n│   └── README.md\n├── smartContract/\n│   ├── contracts/\n│   │   └── Hogwarts.sol\n│   ├── scripts/\n│   │   └── deploy.ts\n│   ├── test/\n│   │   └── HogwartsTest.ts\n│   ├── .$Hogwarts.drawio.bkp\n│   ├── .gitignore\n│   ├── hardhat.config.ts\n│   ├── Hogwarts.drawio\n│   ├── package-lock.json\n│   ├── package.json\n│   ├── README.md\n│   └── tsconfig.json\n├── src/\n│   ├── dynamodb/\n│   │   ├── my-dynamodb-data/\n│   │   │   └── DynamoDB-init.js\n│   │   ├── docker-compose.yaml\n│   │   ├── package-lock.json\n│   │   └── package.json\n│   ├── models/\n│   │   ├── index.ts\n│   │   ├── mongoose-db.ts\n│   │   ├── mongoose-users.ts\n│   │   ├── tokens.ts\n│   │   └── users.ts\n│   ├── SmartContract/\n│   │   ├── artifacts/\n│   │   │   ├── build-info/\n│   │   │   │   └── 12a00651cb07d064766be75da335c2da.json\n│   │   │   └── contracts/\n│   │   │   │   └── Hogwarts.sol/\n│   │   │   │   │   ├── Address.dbg.json\n│   │   │   │   │   ├── Address.json\n│   │   │   │   │   ├── Context.dbg.json\n│   │   │   │   │   ├── Context.json\n│   │   │   │   │   ├── ERC1155.dbg.json\n│   │   │   │   │   ├── ERC1155.json\n│   │   │   │   │   ├── ERC165.dbg.json\n│   │   │   │   │   ├── ERC165.json\n│   │   │   │   │   ├── Hogwarts.dbg.json\n│   │   │   │   │   ├── Hogwarts.json\n│   │   │   │   │   ├── IERC1155.dbg.json\n│   │   │   │   │   ├── IERC1155.json\n│   │   │   │   │   ├── IERC1155MetadataURI.dbg.json\n│   │   │   │   │   ├── IERC1155MetadataURI.json\n│   │   │   │   │   ├── IERC1155Receiver.dbg.json\n│   │   │   │   │   ├── IERC1155Receiver.json\n│   │   │   │   │   ├── IERC165.dbg.json\n│   │   │   │   │   ├── IERC165.json\n│   │   │   │   │   ├── Ownable.dbg.json\n│   │   │   │   │   └── Ownable.json\n│   │   ├── cache/\n│   │   │   └── solidity-files-cache.json\n│   │   └── typechain-types/\n│   │   │   ├── factories/\n│   │   │   │   ├── Hogwarts.sol/\n│   │   │   │   │   ├── ERC1155__factory.ts\n│   │   │   │   │   ├── ERC165__factory.ts\n│   │   │   │   │   ├── Hogwarts__factory.ts\n│   │   │   │   │   ├── IERC1155__factory.ts\n│   │   │   │   │   ├── IERC1155MetadataURI__factory.ts\n│   │   │   │   │   ├── IERC1155Receiver__factory.ts\n│   │   │   │   │   ├── IERC165__factory.ts\n│   │   │   │   │   ├── index.ts\n│   │   │   │   │   └── Ownable__factory.ts\n│   │   │   │   ├── index.ts\n│   │   │   │   └── Lock__factory.ts\n│   │   │   ├── Hogwarts.sol/\n│   │   │   │   ├── ERC1155.ts\n│   │   │   │   ├── ERC165.ts\n│   │   │   │   ├── Hogwarts.ts\n│   │   │   │   ├── IERC1155.ts\n│   │   │   │   ├── IERC1155MetadataURI.ts\n│   │   │   │   ├── IERC1155Receiver.ts\n│   │   │   │   ├── IERC165.ts\n│   │   │   │   ├── index.ts\n│   │   │   │   └── Ownable.ts\n│   │   │   ├── common.ts\n│   │   │   ├── hardhat.d.ts\n│   │   │   ├── index.ts\n│   │   │   └── Lock.ts\n│   ├── test/\n│   │   ├── mocked-users.ts\n│   │   ├── serverless-err-test.spec.ts\n│   │   ├── serverless-test.spec.ts\n│   │   └── webhook-test.json\n│   ├── _BACKUP_77981.gitignore\n│   ├── _BASE_77981.gitignore\n│   ├── _LOCAL_77981.gitignore\n│   ├── _REMOTE_77981.gitignore\n│   ├── .dockerignore\n│   ├── .env\n│   ├── .gitignore\n│   ├── .gitignore.swp\n│   ├── docker-compose.yml\n│   ├── handler.ts\n│   ├── package-lock.json\n│   ├── package.json\n│   ├── serverless.yml\n│   ├── tsconfig.json\n│   └── tslint.json\n├── .DS_Store\n├── package.json\n└── README.md\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmollybeach%2Ftoken-gating-discord-bot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmollybeach%2Ftoken-gating-discord-bot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmollybeach%2Ftoken-gating-discord-bot-api/lists"}