@@ -106,7 +106,7 @@ async def snippets(self, ctx):
106106
107107 @snippets .command (name = 'add' )
108108 @checks .has_permissions (PermissionLevel .SUPPORTER )
109- async def add_ (self , ctx , name : str .lower , * , value ):
109+ async def snippets_add (self , ctx , name : str .lower , * , value ):
110110 """Add a snippet to the bot config."""
111111 if 'snippets' not in self .bot .config .cache :
112112 self .bot .config ['snippets' ] = {}
@@ -124,7 +124,7 @@ async def add_(self, ctx, name: str.lower, *, value):
124124
125125 @snippets .command (name = 'remove' , aliases = ['del' , 'delete' , 'rm' ])
126126 @checks .has_permissions (PermissionLevel .SUPPORTER )
127- async def remove_ (self , ctx , * , name : str .lower ):
127+ async def snippets_remove (self , ctx , * , name : str .lower ):
128128 """Removes a snippet from bot config."""
129129
130130 if self .bot .config .snippets .get (name ):
@@ -386,7 +386,6 @@ def format_log_embeds(self, logs, avatar_url):
386386 if prefix == 'NONE' :
387387 prefix = ''
388388
389-
390389 log_url = self .bot .config .log_url .strip ('/' ) + f'{ prefix } /{ key } '
391390
392391 username = entry ['recipient' ]['name' ] + '#'
@@ -450,9 +449,9 @@ async def logs(self, ctx, *, member: User = None):
450449 session = PaginatorSession (ctx , * embeds )
451450 await session .run ()
452451
453- @logs .command (name = 'closed-by' )
452+ @logs .command (name = 'closed-by' , aliases = [ 'closeby' ] )
454453 @checks .has_permissions (PermissionLevel .SUPPORTER )
455- async def closed_by (self , ctx , * , user : User = None ):
454+ async def logs_closed_by (self , ctx , * , user : User = None ):
456455 """Returns all logs closed by a user."""
457456 user = user or ctx .author
458457
@@ -481,9 +480,9 @@ async def closed_by(self, ctx, *, user: User = None):
481480 session = PaginatorSession (ctx , * embeds )
482481 await session .run ()
483482
484- @logs .command ()
483+ @logs .command (name = 'search' , aliases = [ 'find' ] )
485484 @checks .has_permissions (PermissionLevel .SUPPORTER )
486- async def search (self , ctx , limit : Optional [int ] = None , * , query ):
485+ async def logs_search (self , ctx , limit : Optional [int ] = None , * , query ):
487486 """Searches all logs for a message that contains your query."""
488487
489488 await ctx .trigger_typing ()
@@ -518,7 +517,7 @@ async def search(self, ctx, limit: Optional[int] = None, *, query):
518517 @commands .command ()
519518 @checks .has_permissions (PermissionLevel .SUPPORTER )
520519 @checks .thread_only ()
521- async def reply (self , ctx , * , msg = '' ):
520+ async def reply (self , ctx , * , msg : str ):
522521 """Reply to users using this command.
523522
524523 Supports attachments and images as well as
@@ -531,7 +530,7 @@ async def reply(self, ctx, *, msg=''):
531530 @commands .command ()
532531 @checks .has_permissions (PermissionLevel .SUPPORTER )
533532 @checks .thread_only ()
534- async def anonreply (self , ctx , * , msg = '' ):
533+ async def anonreply (self , ctx , * , msg : str ):
535534 """Reply to a thread anonymously.
536535
537536 You can edit the anonymous user's name,
@@ -547,7 +546,7 @@ async def anonreply(self, ctx, *, msg=''):
547546 @commands .command ()
548547 @checks .has_permissions (PermissionLevel .SUPPORTER )
549548 @checks .thread_only ()
550- async def note (self , ctx , * , msg = '' ):
549+ async def note (self , ctx , * , msg : str ):
551550 """Take a note about the current thread, useful for noting context."""
552551 ctx .message .content = msg
553552 async with ctx .typing ():
@@ -579,7 +578,7 @@ async def find_linked_message(self, ctx, message_id):
579578 @checks .has_permissions (PermissionLevel .SUPPORTER )
580579 @checks .thread_only ()
581580 async def edit (self , ctx , message_id : Optional [int ] = None ,
582- * , new_message ):
581+ * , new_message : str ):
583582 """Edit a message that was sent using the reply command.
584583
585584 If no `message_id` is provided, the
@@ -758,7 +757,6 @@ async def unblock(self, ctx, *, user: User = None):
758757 use only.
759758 """
760759
761-
762760 if user is None :
763761 thread = ctx .thread
764762 if thread :
@@ -803,18 +801,19 @@ async def unblock(self, ctx, *, user: User = None):
803801 @commands .command ()
804802 @checks .has_permissions (PermissionLevel .SUPPORTER )
805803 @checks .thread_only ()
806- async def delete (self , ctx , message_id = None ):
804+ async def delete (self , ctx , message_id : Optional [ int ] = None ):
807805 """Delete a message that was sent using the reply command.
808806
809807 Deletes the previous message, unless a message ID is provided, which in that case,
810808 deletes the message with that message ID.
811809 """
812810 thread = ctx .thread
813811
814- try :
815- message_id = int (message_id )
816- except ValueError :
817- raise commands .BadArgument ('An integer message ID needs to be specified.' )
812+ if message_id is not None :
813+ try :
814+ message_id = int (message_id )
815+ except ValueError :
816+ raise commands .BadArgument ('An integer message ID needs to be specified.' )
818817
819818 linked_message_id = await self .find_linked_message (ctx , message_id )
820819
0 commit comments