mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
discord.py 2.0 update (3d914e08->2.0.1) (#5709)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user