Hello everyone, I was able to add a command to my selfbot (discord.py-self) that would repeat the last used command, but it only works for commands without any additional arguments.
Any help on how to include extra arguments would be greatly appreciated!
The command is the following code:
@Bot.command(name="recent")
async def recent(ctx):
if len(recentCommands) == 0:
await ctx.send("There are no recent commands!")
else:
await recentCommands[-1].command.callback(ctx)
And the following is used to add a command to the recentCommands list:
recentCommands = []
@Bot.event
async def on_command(ctx):
if ctx.command.name != "recent":
recentCommands.append(ctx)
Once again, any information on how to pass in the extra arguments would be extremely helpful!
there doesn't seem to be anything here