#How to load Cogs in discord v2 (pycord)

1 messages · Page 1 of 1 (latest)

oblique mauve
#

I'm using async def main(): async with client: await load_extensions() await client.start(TOKEN)

to load cogs but it seems not working , I'm getting error async with client: AttributeError: __aenter__

sturdy star
#

Hey @oblique mauve just use
client.load_extensions("CogName"). Thats not a async function.

oblique mauve
sturdy star
oblique mauve
#

checking

obsidian lantern
#

eg also don't use await with load_extension

sturdy star
#

Ah yea thats still in your code
you dont need to await load_extension