Code Monkey home page Code Monkey logo

new-fit-for-your-pfp---discord-bot's Introduction

Discord Bot for Dressing up Your PFP

This bot was initially created for the MonkeyDAO to help Solana Monkey Business suit up for Christie's in support of BAYC. It became a hit within the community and we've had a ton of fun with it, so I thought I'd open source it for you to use in your own community.

Magic

clean_pfp suitpfp_with_fit

Setup

  • Replace the json file in the root directory with your own and ensure it's named attributes.json. This should include the PFP IDs and the respective image URL. See the included file as an example

  • Update the get_pfp_img_url() function with the keys for your pfp ids and image urls from the json file

  • In the outfits folder, drop the transparent pngs you'd like to use as "fits". These should be named descriptively as whatever you name the files are what the bot will use as the command arguments

  • Update the list called "outfits" with a list of strings that match your outfit file names (omit the .png). So if "suit" is one of your outfits in the list, then suit.png should be in the "outfits" folder

  • The bot command called "newfit" has a conditional statement to check that the pfp id entered is within the correct range. Update these values to match the acceptable ranges of your project.

That's it! Setup the bot and invite it into your server and you should be good to go.

How to use it

The basic command format is !newfit <fit> <pfp_id>. So you might enter !newfit suit 970.

The command !fits will list all of the fitst defined in the "outfits" list so the user knows what options are available to them.

I hope your community has fun with this!

If they do, and you're feeling generous, send me an NFT so I can join :)

  • SOL: C5XYM4RDtEdKm5NhDLhYJ7gH4vNRocna5qYb1pCThNa
  • ETH: 0xAf1c16F1370dEdad2784287595f9152D8A1575d3

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.