Package: pilcord
pilcordgithubstatus:new image gen everyday!A library rich with many image generation funcitons powered by PIL for your discord bot such as leveling, welcome card and meme generation!ranking card previewcard1card2card3same as card2 but with backgroundmeme generation previewfight_under_this_flaguwu_discordripinstallationfor pypi versionpipinstallpilcordfor github developement versionpipinstallgit+https://github.com/ResetXD/pilcordHow To UseThe method will returnbyteswhich can directly be used in discord.py/disnake/pycord/nextcord 'sFile class.Documentationrank card docsRankCardclass__init__methodRankCard(settings:CardSettings,avatar:str,level:int,current_exp:int,max_exp:int,username:str,rank:Optional[int]=None)settings- Settings class from DiscordLevelingCard.avatar- avatar image url.level- level of the user.current_exp- current exp of the user.max_exp- max exp of the user.username- username of the user.rank- rank of the user. (optional)CardSettingsclass__init__methodCardSettings(background:Union[PathLike,BufferedIOBase,str],bar_color:Optional[str]='white',text_color:Optional[str]='white',background_color:Optional[str]="#36393f")background- background image url or file-object inrbmode.4:1aspect ratio recommended.bar_color- color of the bar [example: "white" or "#000000"]text_color- color of the text [example: "white" or "#000000"]background_color- color of the background [example: "white" or "#000000"]card1methodRankCard.card1()returns-byteswhich can directly be used withindiscord.Fileclass.card2methodRankCard.card2()returns-byteswhich can directly be used withindiscord.Fileclass.card3methodRankCard.card3()returns-byteswhich can directly be used withindiscord.Fileclass.exampleIt returns bytes which can directly be used in discord.py and its fork's File class.fromdisnake.extimportcommandsfromDiscordLevelingCardimportRankCard,CardSettingsimportdisnakeclient=commands.Bot()# define background, bar_color, text_color at one placecard_settings=CardSettings(background="url or path to background image",text_color="white",bar_color="#000000")@client.slash_command(name="rank")asyncdefuser_rank_card(ctx,user:disnake.Member):awaitctx.response.defer()a=RankCard(settings=card_settings,avatar=user.display_avatar.url,level=1,current_exp=1,max_exp=1,username="cool username",rank=1)image=awaita.card1()awaitctx.edit_original_message(file=disnake.File(image,filename="rank.png"))# providing filename is very importantrank card docsMemeclass__init__methodMeme(avatar:str)avatar- image url.fight_under_this_flagmethodMeme.fight_under_this_flag()returns-byteswhich can directly be used withindiscord.Fileclass.uwu_discordmethodMeme.uwu_discord()returns-byteswhich can directly be used withindiscord.Fileclass.ripmethodMeme.rip()returns-byteswhich can directly be used withindiscord.Fileclass.exampleIt returns bytes which can directly be used in discord.py and its fork's File class.fromdisnake.extimportcommandsfromDiscordLevelingCardimportMemeimportdisnakeclient=commands.Bot()@client.slash_command(name="fight_under_this_flag")asyncdeffight_under_this_flag_meme(ctx,user:disnake.Member):awaitctx.response.defer()a=Meme(avatar=user.display_avatar.url)image=awaita.fight_under_this_flag()awaitctx.edit_original_message(file=disnake.File(image,filename="fight.png"))# providing filename is very important