GithubHelp home page GithubHelp logo

degendaoo / pfp-newfit-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xbagp/new-fit-for-your-pfp---discord-bot

0.0 0.0 0.0 5.74 MB

Discord bot that will give your PFP a new fit

License: GNU General Public License v3.0

Python 98.93% Procfile 0.49% Shell 0.58%

pfp-newfit-bot's Introduction

Archive

We've moved active development over to a new repo: gib-pfp-discord-bot since we've departed from the original methods and are actively developing in a new direction now!


Discord Bot for Creating Degeniverse Promo PFPs

We originally forked the MonkeyDAO Discord Bot to help promote various marketing efforts by adding custom traits to your DAA / DTP / DEGG pfp. Over time it was re-written to suit our needs and make it easier to roll out new campaigns with ease, and changed enough to deserve its own repo.

Results

[In Discord] !gib ape 1297 beer

clean_pfp suit pfp_with_fit

Cool things going on here...

Users simply need to type their collection (ape/dtp/egg) and the number of the NFT, along with the name of the campaign/promo. In the background we download the image, before performing an image tranformation, and sending it back to discord.

For DAA, we have all the image urls for versions without any headtraits (super useful), but for DTP/DEGG we use The Hyperspace API to querey the chain for the NFT metadata, pull the image url, download that and then perform the transformation. No need for a big json file for every Degeniverse NFT!

Getting Started

1. Setup

First, setup your .env file to store your secrets. See Create the Discord Bot for generating that token.

cp .env.example .env

## .env file
DISCORD_TOKEN=
HYPER_TOKEN=

We use Poetry for our dependency & package mgmt. To get everything installed and run the application:

poetry install

poetry run python main.py

This runs the bot locally on your machine... fine for testing, but you'll want to Deploy to Heroku so it runs on an always available server.

2. Adding a new campaign

  • In each collection folder, create a folder in /outfits with the name of the campaign.

    N.B. this will be used in the command so choose wisely.

  • Next add the transparent pngs into that folder, with each filename representing a "variant" of the trait. If there are no variants, then name the file "default.png" for easier usage.

  • Update the gib-help bot command in main.py with the new campaign info to help people know how to use the thing.

3. Create the Discord Bot

Easiest just to point you here: Setup the bot and then invite it into your server -- giving it access to the channels you'd like people to use it.

4. Deploy to Heroku

We've included a Procfile, requirements.txt, and runtime.txt files to make it easy for you to deploy your bot for free on Heroku. Here is a handy guide to get you started.

But once you're setup, generally it looks like this to deploy your code to Heroku and have the process started:

git push heroku master

5. How to use it in Discord

Generally this is the pattern utilized to initiate the bot in discord. Everything is explained in the main.py file as well. The variant parameter is optional and assumed to be default. See Bussin for an example of using lots of different variants.

!gib [collection] [id] [campaign] [variant]
!gib [ape/dtp/egg] [123] [solcap/solsnap/bussin/beer] [black/blue/red/white... etc]

Ex:
!gib ape 123 solcap
!gib ape 123 bussin blue
!gib dtp 456 solsnap 
!gib egg 789 beer 

Thats it!

Hope this helps you develop something cool for your community! Give me a shout at @jsb_sol if you need help or have built something cool yourself!

pfp-newfit-bot's People

Contributors

jsblair9 avatar 0xbagp 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.