@@ -1752,6 +1752,13 @@ async def autotrigger_add(self, ctx, keyword, *, command):
17521752 valid = True
17531753 break
17541754
1755+ if not valid and self .bot .aliases :
1756+ for n in range (1 , len (split_cmd ) + 1 ):
1757+ if self .bot .aliases .get (" " .join (split_cmd [0 :n ])):
1758+ print (self .bot .aliases .get (" " .join (split_cmd [0 :n ])))
1759+ valid = True
1760+ break
1761+
17551762 if valid :
17561763 self .bot .auto_triggers [keyword ] = command
17571764 await self .bot .config .update ()
@@ -1765,7 +1772,7 @@ async def autotrigger_add(self, ctx, keyword, *, command):
17651772 embed = discord .Embed (
17661773 title = "Error" ,
17671774 color = self .bot .error_color ,
1768- description = "Invalid command. Note that autotriggers do not work with aliases ." ,
1775+ description = "Invalid command. Please provide a valid command or alias ." ,
17691776 )
17701777
17711778 await ctx .send (embed = embed )
@@ -1785,6 +1792,14 @@ async def autotrigger_edit(self, ctx, keyword, *, command):
17851792 valid = True
17861793 break
17871794
1795+ if not valid and self .bot .aliases :
1796+ for n in range (1 , len (split_cmd ) + 1 ):
1797+ print (" " .join (split_cmd [0 :n ]), self .bot .aliases .get (" " .join (split_cmd [0 :n ])))
1798+ if self .bot .aliases .get (" " .join (split_cmd [0 :n ])):
1799+ print (self .bot .aliases .get (" " .join (split_cmd [0 :n ])))
1800+ valid = True
1801+ break
1802+
17881803 if valid :
17891804 self .bot .auto_triggers [keyword ] = command
17901805 await self .bot .config .update ()
@@ -1798,7 +1813,7 @@ async def autotrigger_edit(self, ctx, keyword, *, command):
17981813 embed = discord .Embed (
17991814 title = "Error" ,
18001815 color = self .bot .error_color ,
1801- description = "Invalid command. Note that autotriggers do not work with aliases ." ,
1816+ description = "Invalid command. Please provide a valid command or alias ." ,
18021817 )
18031818
18041819 await ctx .send (embed = embed )
0 commit comments