Skip to content

Commit

Permalink
new meme bans
Browse files Browse the repository at this point in the history
  • Loading branch information
eip618 committed Dec 7, 2024
1 parent 873472d commit e6b0759
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion cogs/kickban.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ async def ban_member(self, ctx: GuildContext, member: discord.Member | discord.U
f"{member} has been sent to the UK. πŸ‘",
f"{member} has encountered an error, and needs to close. πŸ‘",
f"{member} is not responding, and has been terminated. πŸ‘",
f"{member} ran into a problem and needs to restart. Please refer to my dick and balls for more information. πŸ‘"]
f"{member} ran into a problem and needs to restart. Please refer to my dick and balls for more information. πŸ‘",
f"{member} has been 360 noscoped on Rust. πŸ‘"]
if await check_bot_or_staff(ctx, member, "ban"):
return

Expand Down Expand Up @@ -185,6 +186,29 @@ async def superban(self, ctx: GuildContext, member: discord.Member | discord.Use
await ctx.send(f"{member} is now SUPER BANNED. πŸ‘ https://nintendohomebrew.com/assets/img/banned.gif")
await self.bot.logs.post_action_log(ctx.author, member, 'ban', reason=reason)

@is_staff("OP")
@commands.bot_has_permissions(ban_members=True)
@commands.command(name="trainban", aliases=["ryanban"])
async def trainban(self, ctx: GuildContext, member: discord.Member | discord.User, days: Optional[Literal[0, 1, 2, 3, 4, 5, 6, 7]] = 0, *, reason: Optional[str] = None):
"""Bans a user from the server. OP+ only. Optional: [days] Specify up to 7 days of messages to delete."""
if await check_bot_or_staff(ctx, member, "ban"):
return

if isinstance(member, discord.Member):
msg = f"You were trains'd from {ctx.guild.name}."
if reason:
msg += " The given reason is: " + reason
msg += "\n\nThis ban does not expire.\n\nhttps://nintendohomebrew.com/assets/img/trains.gif"
await send_dm_message(member, msg, ctx)
try:
await ctx.guild.ban(member, reason=reason, delete_message_days=days) # type: ignore
except discord.errors.Forbidden:
await ctx.send("Failed to ban member.")
return
await self.restrictions.remove_restriction(member, Restriction.Ban)
await ctx.send(f"{member} has been hit by a train. πŸ‘ https://nintendohomebrew.com/assets/img/trains.gif")
await self.bot.logs.post_action_log(ctx.author, member, 'ban', reason=reason)

@commands.bot_has_permissions(ban_members=True)
@commands.command(name="unban", aliases=["unyeet"])
async def unban_member(self, ctx: GuildContext, user: discord.Member | discord.User, *, reason: Optional[str] = None):
Expand Down

0 comments on commit e6b0759

Please sign in to comment.