Re-add missing kick command

This commit is contained in:
Zeva Rose 2021-08-05 10:36:41 -06:00
parent df7df919d7
commit 969f041276

View file

@ -13,8 +13,7 @@ class KickCog(CacheCog):
def __init__(self, bot): def __init__(self, bot):
super().__init__(bot) super().__init__(bot)
@cog_ext.cog_slash(
@cog_ext.cog_slash(
name="kick", name="kick",
description="Kick a user", description="Kick a user",
options=[ options=[
@ -31,9 +30,9 @@ class KickCog(CacheCog):
option_type=3, option_type=3,
), ),
], ],
) )
@admin_or_permissions(kick_members=True) @admin_or_permissions(kick_members=True)
async def _kick(self, ctx: SlashContext, user: User, reason=None): async def _kick(self, ctx: SlashContext, user: User, reason=None):
if not user or user == ctx.author: if not user or user == ctx.author:
await ctx.send("You cannot kick yourself.", hidden=True) await ctx.send("You cannot kick yourself.", hidden=True)
return return
@ -44,7 +43,9 @@ async def _kick(self, ctx: SlashContext, user: User, reason=None):
await ctx.send("Reason must be < 100 characters", hidden=True) await ctx.send("Reason must be < 100 characters", hidden=True)
return return
if not reason: if not reason:
reason = "Mr. Stark is displeased with your presence. Please leave." reason = (
"Mr. Stark is displeased with your presence. Please leave."
)
guild_name = ctx.guild.name guild_name = ctx.guild.name
embed = build_embed( embed = build_embed(
title=f"You have been kicked from {guild_name}", title=f"You have been kicked from {guild_name}",