#can someone help me pls ?

1 messages · Page 1 of 1 (latest)

prime bough
#
        if ("http://" in info) or ("https://" in info) :
            if not os.path.exists(f"users_data/{ctx.guild.id}/invoices/{customer.id}") :
                os.mkdir(f"users_data/{ctx.guild.id}/invoices/{customer.id}")
            adt = datetime.now()
            at = adt.strftime("%H:%M")
            embed = discord.Embed(title = f". . .", description = f". . .", color = 0x2c245b)
            embed.set_footer(text = config["footer_txt"], icon_url = config['footer_img'] )

            dict = {"title" : f"{customer.name} 's invoice :", "description" : embed.description}
            with open(f'users_data/{ctx.guild.id}/invoices/{customer.id}/{str(date.today())}~{at}.json', "w") as filewname :
                sdl = "\n"
                json.dump(dict, filewname)
                filewname.write(sdl)
                filewname.close()

            await ctx.respond(embed = embed)
#

it's not json file, there is not the dict dictionary and there is not the minutes in the file name

prime bough
#

sorry for mentions sad

digital prism
#

no, not sorry, you aren't allowed to mention helpers as per rules

scenic sluice
#

colon isnt allowed in file names so your at variable is basically cutting off the program

prime bough
scenic sluice
#

if you really need the exact timestamp, just replace colon with something else

scenic sluice
#
at = adt.strftime("%H;%M")
#

or anything else basically that is not colon

prime bough
#

okay thanks

cunning timber
#

.close