discord.py 2.0 update (3d914e08->2.0.1) (#5709)

This commit is contained in:
Jakub Kuczys
2022-10-03 16:07:15 +02:00
committed by GitHub
parent d7d6ab46f4
commit f02528378f
44 changed files with 454 additions and 317 deletions

View File

@@ -31,8 +31,8 @@ In terms of scope, global rules will be checked first, then server rules.
For each of those, the first rule pertaining to one of the following models will be used:
1. User
2. Voice channel
3. Text channel (parent text channel in case of invocations in threads)
2. Voice channel a user is connected to
3. The channel command was issued in (parent channel in case of invocations in threads)
4. Channel category
5. Roles, highest to lowest
6. Server (can only be in global rules)

View File

@@ -21,9 +21,7 @@ Basic Usage
class MyCog(commands.Cog):
@commands.command()
async def balance(self, ctx, user: discord.Member = None):
if user is None:
user = ctx.author
async def balance(self, ctx, user: discord.Member = commands.Author):
bal = await bank.get_balance(user)
currency = await bank.get_currency_name(ctx.guild)
await ctx.send(