Skip to content

Commit e6b0759

Browse files
committed
new meme bans
1 parent 873472d commit e6b0759

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

cogs/kickban.py

+25-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ async def ban_member(self, ctx: GuildContext, member: discord.Member | discord.U
8181
f"{member} has been sent to the UK. 👍",
8282
f"{member} has encountered an error, and needs to close. 👍",
8383
f"{member} is not responding, and has been terminated. 👍",
84-
f"{member} ran into a problem and needs to restart. Please refer to my dick and balls for more information. 👍"]
84+
f"{member} ran into a problem and needs to restart. Please refer to my dick and balls for more information. 👍",
85+
f"{member} has been 360 noscoped on Rust. 👍"]
8586
if await check_bot_or_staff(ctx, member, "ban"):
8687
return
8788

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

189+
@is_staff("OP")
190+
@commands.bot_has_permissions(ban_members=True)
191+
@commands.command(name="trainban", aliases=["ryanban"])
192+
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):
193+
"""Bans a user from the server. OP+ only. Optional: [days] Specify up to 7 days of messages to delete."""
194+
if await check_bot_or_staff(ctx, member, "ban"):
195+
return
196+
197+
if isinstance(member, discord.Member):
198+
msg = f"You were trains'd from {ctx.guild.name}."
199+
if reason:
200+
msg += " The given reason is: " + reason
201+
msg += "\n\nThis ban does not expire.\n\nhttps://nintendohomebrew.com/assets/img/trains.gif"
202+
await send_dm_message(member, msg, ctx)
203+
try:
204+
await ctx.guild.ban(member, reason=reason, delete_message_days=days) # type: ignore
205+
except discord.errors.Forbidden:
206+
await ctx.send("Failed to ban member.")
207+
return
208+
await self.restrictions.remove_restriction(member, Restriction.Ban)
209+
await ctx.send(f"{member} has been hit by a train. 👍 https://nintendohomebrew.com/assets/img/trains.gif")
210+
await self.bot.logs.post_action_log(ctx.author, member, 'ban', reason=reason)
211+
188212
@commands.bot_has_permissions(ban_members=True)
189213
@commands.command(name="unban", aliases=["unyeet"])
190214
async def unban_member(self, ctx: GuildContext, user: discord.Member | discord.User, *, reason: Optional[str] = None):

0 commit comments

Comments
 (0)