Giter Club home page Giter Club logo

discord-collect-address's Introduction

Discord-Collect-Address

This is a simple discord bot that collects EVM address of the user and stores it in a database with redis cache. Users can submit their address whatever they want as long as it fulfills the EVM address format. It does not check the validity of the address and no signing is required.

Environment Requirements

  • Node.js v20 or higher
  • Redis server
  • PostgreSQL server

Installation

  1. Clone the repository
  2. Install the dependencies
npm install
  1. Copy the .env.example file to .env and fill in the required information
  • Register your Discord App here Discord Developer Portal
  • Go to Bot section to get the bot token, fill in the DISCORD_TOKEN field
  • Go to OAuth2 section to get the client ID, fill in the DISCORD_CLIENT_ID field
    • Check bot under SCOPES section
    • Check Use Slash Commands under BOT PERMISSIONS section
    • You will get the OAuth2 URL, visit the URL to invite the bot to your server
  • Fill in the DISCORD_GUILD_ID field with your server ID
  • Fill in the DISCORD_CHANNEL_ID field with your channel ID where the bot should respond
  • Fill in the DISCORD_COMMAND_PREFIX field with the prefix you want to use for the bot commands
  1. Initialize the database
npx prisma migrate dev
  1. Install the slash commands to your server
npm run deploy
  1. Start the server (you can use pm2 to keep the server running)
npm run serve

Usage

Assume polyverse is the command prefix, you can use the following commands:

  • /polyverse-link - Link your EVM address to your Discord account
  • /polyverse-query - Query the EVM address that linked to your Discord account

License

MIT

discord-collect-address's People

Contributors

stevenlei avatar

Watchers

 avatar

Forkers

kenobijon

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.