Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
[Python] Is there any way to make this simpler?
Author Summary
AlbertoAru is in PYTHON
Post Body

I'm seeing some code that has this:

@bot.command()
async def load(ctx, cog: str):
    await bot.load_extension(f"cogs.{cog.lower()}")

@bot.command()
async def unload(ctx, cog: str):
    await bot.unload_extension(f"cogs.{cog.lower()}")

@bot.command()
async def reload(ctx, cog: str):
    await bot.reload_extension(f"cogs.{cog.lower()}")

Are the three @bot.command() necessary, or can they be under one by doing something with it? Maybe something weird like @bot.command() { async... async ... async ...} (I'm making this up as an example)

Author
Account Strength
0%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
188,604
Link Karma
150,782
Comment Karma
36,255
Profile updated: 3 months ago
Posts updated: 7 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago