mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-20 04:13:37 +12:00
Merge pull request #17 from brandons209/bandm-days-fix
Added the days argument to the bandm command
This commit is contained in:
commit
f2b2693865
|
@ -9,7 +9,7 @@ import discord
|
||||||
from .utils import *
|
from .utils import *
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
import asyncio
|
import asyncio
|
||||||
from typing import Union
|
from typing import Union, Optional
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
@ -999,7 +999,7 @@ class MoreAdmin(commands.Cog):
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@checks.admin_or_permissions(ban_members=True)
|
@checks.admin_or_permissions(ban_members=True)
|
||||||
@checks.bot_has_permissions(ban_members=True)
|
@checks.bot_has_permissions(ban_members=True)
|
||||||
async def bandm(self, ctx, member: discord.Member, *, reason: str = None):
|
async def bandm(self, ctx, member: discord.Member, days: Optional[int] = None, *, reason: str = None):
|
||||||
"""
|
"""
|
||||||
Ban a member and have the bot DM them a message
|
Ban a member and have the bot DM them a message
|
||||||
"""
|
"""
|
||||||
|
@ -1018,7 +1018,7 @@ class MoreAdmin(commands.Cog):
|
||||||
except discord.HTTPException:
|
except discord.HTTPException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
await ctx.invoke(ban_command, member, reason=reason)
|
await ctx.invoke(ban_command, user=member, days=days, reason=reason)
|
||||||
await ctx.tick()
|
await ctx.tick()
|
||||||
|
|
||||||
### Listeners ###
|
### Listeners ###
|
||||||
|
|
Loading…
Reference in a new issue