Fix unban keyword argument error

This commit is contained in:
Zeva Rose 2021-07-03 17:44:03 -06:00
parent a62c42042e
commit c9d452539c

View file

@ -89,7 +89,7 @@ class AdminCog(commands.Cog):
guild_name = ctx.guild.name
user_message = (
f"You have been {mtype}banned from {guild_name}."
+ " Reason:\n{reason}"
+ f" Reason:\n{reason}"
)
time = datetime.now()
expiry = None
@ -152,8 +152,8 @@ class AdminCog(commands.Cog):
guild_ids=[418094694325813248, 578757004059738142],
options=[
create_option(
name="id",
description="User ID to unban",
name="user",
description="User to unban",
option_type=3,
required=True,
),
@ -172,7 +172,7 @@ class AdminCog(commands.Cog):
user: str,
reason: str,
):
ctx.defer()
await ctx.defer()
orig_user = user
discrim = None
@ -290,7 +290,7 @@ class AdminCog(commands.Cog):
self, ctx: SlashContext, type: int = 0, active: int = 1
):
active = bool(active)
ctx.defer()
await ctx.defer()
types = [0, "perm", "temp", "soft"]
search = {"guild": ctx.guild.id}
if active:
@ -445,7 +445,7 @@ class AdminCog(commands.Cog):
async def _mute(
self, ctx: SlashContext, user: Member, reason: str, length: int = 30
):
ctx.defer()
await ctx.defer()
if user == ctx.author:
await ctx.send("You cannot mute yourself.")
return
@ -505,7 +505,7 @@ class AdminCog(commands.Cog):
)
@admin_or_permissions(mute_members=True)
async def _unmute(self, ctx: SlashContext, user: Member):
ctx.defer()
await ctx.defer()
mute_setting = self.db.jarvis.settings.find_one(
{"guild": ctx.guild.id, "setting": "mute"}
)