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