@@ -81,7 +81,8 @@ async def ban_member(self, ctx: GuildContext, member: discord.Member | discord.U
81
81
f"{ member } has been sent to the UK. 👍" ,
82
82
f"{ member } has encountered an error, and needs to close. 👍" ,
83
83
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. 👍" ]
85
86
if await check_bot_or_staff (ctx , member , "ban" ):
86
87
return
87
88
@@ -185,6 +186,29 @@ async def superban(self, ctx: GuildContext, member: discord.Member | discord.Use
185
186
await ctx .send (f"{ member } is now SUPER BANNED. 👍 https://nintendohomebrew.com/assets/img/banned.gif" )
186
187
await self .bot .logs .post_action_log (ctx .author , member , 'ban' , reason = reason )
187
188
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 \n This ban does not expire.\n \n https://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
+
188
212
@commands .bot_has_permissions (ban_members = True )
189
213
@commands .command (name = "unban" , aliases = ["unyeet" ])
190
214
async def unban_member (self , ctx : GuildContext , user : discord .Member | discord .User , * , reason : Optional [str ] = None ):
0 commit comments