Open SpaceLuc opened 1 year ago
sounds interesting!
Though i need more info on this about what exactly you are looking for with examples.
In simple words: I want to have some variables to set the size and coordinates of each element. So I can make the user image a little smaller and move it to another place or just move the text a bit. Also the possibility to set the size of the background image and the "black frame" would be great.
ahhh not bad of an idea! i will look into this immediately and most likely update the library within two day. please test and give your feedback when it is done.
PS. if you like the library then staring the repo really keeps me motivated. ❤
Thanks, I will give you feedback once you are done
PS. you have now another star 😉
good evening SpaceLuc, I added something and I really want you to test it out because I don't have a discord bot to test on.
I added Sandbox
class to create custom card1
if constantly changing code and running discord bot to see your custom card becomes tedious, I added Tester
class.
I also added another Example
folder for how to use the tester class.
Current sandbox only has one method which helps with customizing card1 only.
you can also resize the result image with
resizeattribute available in
card1,
card2,
card3` and sandbox card1
examples.
example code should look something like:
from DiscordLevelingCard import Sandbox, Settings, Tester
import asyncio
from PIL import Image
setting = Settings(
background="./bg.jpg",
bar_color="white",
text_color="white")
async def main():
rank = Sandbox(
username="resetxd",
level=10,
current_exp=100,
max_exp=400,
settings=setting,
avatar=Image.open("./avatarimg.png")
)
await rank.custom_card1(card_colour="blue") # "blue" or "#0000FF" both should work
Image.open(result).save("result.png", "PNG")
asyncio.run(main())
Do you like this feature? I loved it 🎉
Hey! Thanks for your efforts, the code works.
Why is there a black line on the red card? It came at first on mine as well but then i recreated the asset to fix it. I think your system is cacheing the old asset instead of download the new one
idk ... but it seems that the image somehow shows through from below?
What? I didn't understand
If you fine with it, we should continue this on discord.
yeah, sure i send you a fa
Hey, would it be possible to make the individual cards customizable in size and position of the individual elements? Currently you have to stick to the default design and can only change the color of the text/bar.
I like the style of the third card (it's similar to mee6's), but it's way too big and takes up too much space in the chat.
Would love it if there was an option that you can set the positions and sizes of the individual elements. Kind of like a sandbox where you push everything to the right place yourself.