@@ -39,6 +39,7 @@ async def convert(self, ctx, argument):
3939class Moderator :
4040 def __init__ (self , bot ):
4141 self .bot = bot
42+ self .config = default .get ("config.json" )
4243
4344 @commands .command ()
4445 @commands .guild_only ()
@@ -178,10 +179,10 @@ async def find_discriminator(self, ctx, *, search: str):
178179 await ctx .send (content = f"Found **{ len (result )} ** on your search for **{ search } **" ,
179180 file = discord .File (data , filename = default .timetext (f'DiscriminatorSearch' )))
180181
181- @commands .group (aliases = [ 'prune' ] )
182+ @commands .group ()
182183 @commands .guild_only ()
183184 @permissions .has_permissions (manage_messages = True )
184- async def remove (self , ctx ):
185+ async def prune (self , ctx ):
185186 """ Removes messages from the current server. """
186187
187188 if ctx .invoked_subcommand is None :
@@ -211,32 +212,32 @@ async def do_removal(self, ctx, limit, predicate, *, before=None, after=None, me
211212 if message is True :
212213 await ctx .send (f'🚮 Successfully removed { deleted } message{ "" if deleted == 1 else "s" } .' )
213214
214- @remove .command ()
215+ @prune .command ()
215216 async def embeds (self , ctx , search = 100 ):
216217 """Removes messages that have embeds in them."""
217218 await self .do_removal (ctx , search , lambda e : len (e .embeds ))
218219
219- @remove .command ()
220+ @prune .command ()
220221 async def files (self , ctx , search = 100 ):
221222 """Removes messages that have attachments in them."""
222223 await self .do_removal (ctx , search , lambda e : len (e .attachments ))
223224
224- @remove .command ()
225+ @prune .command ()
225226 async def images (self , ctx , search = 100 ):
226227 """Removes messages that have embeds or attachments."""
227228 await self .do_removal (ctx , search , lambda e : len (e .embeds ) or len (e .attachments ))
228229
229- @remove .command (name = 'all' )
230+ @prune .command (name = 'all' )
230231 async def _remove_all (self , ctx , search = 100 ):
231232 """Removes all messages."""
232233 await self .do_removal (ctx , search , lambda e : True )
233234
234- @remove .command ()
235+ @prune .command ()
235236 async def user (self , ctx , member : discord .Member , search = 100 ):
236237 """Removes all messages by the member."""
237238 await self .do_removal (ctx , search , lambda e : e .author == member )
238239
239- @remove .command ()
240+ @prune .command ()
240241 async def contains (self , ctx , * , substr : str ):
241242 """Removes all messages containing a substring.
242243 The substring must be at least 3 characters long.
@@ -246,7 +247,7 @@ async def contains(self, ctx, *, substr: str):
246247 else :
247248 await self .do_removal (ctx , 100 , lambda e : substr in e .content )
248249
249- @remove .command (name = 'bots' )
250+ @prune .command (name = 'bots' )
250251 async def _bots (self , ctx , prefix = None , search = 100 ):
251252 """Removes a bot user's messages and messages with their optional prefix."""
252253
@@ -255,7 +256,7 @@ def predicate(m):
255256
256257 await self .do_removal (ctx , search , predicate )
257258
258- @remove .command (name = 'users' )
259+ @prune .command (name = 'users' )
259260 async def _users (self , ctx , prefix = None , search = 100 ):
260261 """Removes only user messages. """
261262
@@ -264,7 +265,7 @@ def predicate(m):
264265
265266 await self .do_removal (ctx , search , predicate )
266267
267- @remove .command (name = 'emoji' )
268+ @prune .command (name = 'emoji' )
268269 async def _emoji (self , ctx , search = 100 ):
269270 """Removes all messages containing custom emoji."""
270271 custom_emoji = re .compile (r'<:(\w+):(\d+)>' )
@@ -274,7 +275,7 @@ def predicate(m):
274275
275276 await self .do_removal (ctx , search , predicate )
276277
277- @remove .command (name = 'reactions' )
278+ @prune .command (name = 'reactions' )
278279 async def _reactions (self , ctx , search = 100 ):
279280 """Removes all reactions from messages that have them."""
280281
0 commit comments