I have a problem in my code that I can't seem to find a way to fix. I have a custom help command which works fine but when I define the docstring as a fstring it gives None
as an output
code from my help command:
if cmd.help:
emd.add_field(name=f'{self.client.command_prefix}{cmd}', value=f'{aliases}\n{cmd.help}\u200b', inline=False)
found_cmd = True
else:
print(cmd.help)
emd.add_field(name=f'{self.client.command_prefix}{cmd}', value=f'{aliases}\n - \u200b', inline=False)
The roll command I tried the test command:
@commands.command()
async def roll(self, ctx, sides:int = 6, num_of_times_to_roll:int=1):
f'''syntax:`{self.client.command_prefix}roll [number of sides] [number of times to roll]` \nThis command rolls a die or dice with any number of sides and any number of times \n\n`{self.client.command_prefix}roll_side` \nThis command only takes the number of sides as an input'''
I think that python does not read fstrings as docstrings because when I try the help command with normal docstrings it works fine. If anyone knows how to fix this problem please tell me. Thanks in advance.