I am working on a discord bot with nextcord, and want to save a discord user object on command. I have this code:
@commands.command()
async def record(self, item):
pickle.dump(item, open("filepath.txt", "wb"))
In discord that would be run like this:
.record @Username#0000
It is supposed to pickle the user object (@Username#0000) to filepath.txt, but instead it throws this error:
TypeError: cannot pickle 'TaskStepMethWrapper' object
Is there any other way to store and load objects that would be able to store and load 'TaskStepMethWrapper' object?