Skip to main content

This is simple maker for cards in discord bot.

Project description

mariocard.py

Discord server invite PyPI version info

This is simple maker for cards in discord bot in discord.py or pycord.

Installing

Python 3.8 or higher is required

# Linux/macOS
pip3 install -U mariocard.py

# Windows
pip install -U mariocard.py

Level Card Example

from discord.ext import commands
from mariocard import *

client = commands.Bot(command_prefix=".")

@client.command()
async def card(ctx):
    #creating levelcard object
    levelcard = LevelCard()

    #setting avatar url for image
    levelcard.avatar = ctx.author.avatar_url

    #setting member name
    levelcard.name = ctx.author

    #setting xp for bar on card
    levelcard.xp = 10

    #setting required xp for bar on card
    levelcard.required_xp = 20

    #setting level to text on crad
    levelcard.level = 2

    #sending image to discord channel
    await ctx.send(file=await levelcard.create())

client.run("token")

Generated Level Card

Created card from example code

Welcome Card Example

from discord.ext import commands
from mariocard import *

client = commands.Bot(command_prefix=".")

@client.command()
async def card(ctx):
    #creating levelcard object
    levelcard = LevelCard()

    #setting avatar url for image
    levelcard.avatar = ctx.author.avatar_url

    #setting member name
    levelcard.name = ctx.author

    #setting server name
    levelcard.server = ctx.guild.name

    #sending image to discord channel
    await ctx.send(file=await levelcard.create())

client.run("token")

Generated Welcome Card

Created card from example code

Change Log

version 1.0.0: -first version

version 1.0.1: -added documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mariocard.py-1.0.2.tar.gz (36.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page