Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/nft-rainbow/discordBot

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/nft-rainbow/discordBot

  • v0.0.0-20220905082846-1cebc1a858ac
  • Source
  • Go
  • Socket score

Version published
Created
Source

DiscordBot

DiscordNFTBot

Description

This is a NFTRainbow-based discord bot, which helps users in the discord to mint NFTs easily. On the other hand, this bot can be used on the community activities to increase community activity.

References

NFTRainbow Console

NFTRainbow Doc

NFTRainbow Git

Functions

For the admin of the bot, he can choose to use the default erc721 contract, or to deploy his own erc721 or erc1155 contract. To achieve this target, the admin can use the provided CMD to upload file to obtain the file_url, which is used by the admin to deploy the contract through the provided CMD.

For the users in the discord channel where the bot is deployed, they can mint their own NFTs through the contract provided by the admin.

Run

CMD

cd botCMD

Generate the config.yaml

cp config-sample.yaml config.yaml

Input the app_id and app_secret, which can be obtained from the NFTRainbow console

Generate the binary file

make build

Upload file to server to obtain the file_url

botCMD upload [file_path]
# file_path is the uploaded file path

Deploy the contract

botCMD deploy [name] [symbol] [type] [appAddress]
Parameters NameMeaningRequired or Optional
nameThe name of the NFTrequired
symbolThe symbol of the NFTrequired
typeThe type of contracts including erc721 and erc1155required
appAddressThe address of the app account,which can be obtained from the NFTRainbow consolerequired

Bot configuration

Generate the config.yaml

cp config-sample.yaml config.yaml

Config the yaml

  • Input the app_id and app_secret
  • Input the botToken which can be obtained from the discord. This can refer to https://www.writebots.com/discord-bot-token/
  • Input the default mint configuration including file_url, name, description and so on.
  • If the admin of the bot want to use his own contract to mint, the contractAddress is required to call customMint. Please input the parameter.

Run the project

go run main.go

How to mint the NFTs

EasyMint

After the users in the discord channel can input the /claim easy-mint [user_address] to the chat frame, the bot will return the NFT information in several seconds.

Parameters NameMeaningRequired or Optional
user_addressThe blockchain address of the userrequired
CustomMint

After the users in the discord channel can input the /claim custom-mint [user_address] to the chat frame, the bot will return the NFT information in several seconds.

Parameters NameMeaningRequired or Optional
user_addressThe blockchain address of the userrequired

Supported Chains

Present Supported Chains

FAQs

Package last updated on 05 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc