@@ -18,10 +18,10 @@ class Hook:
1818 def __init__ (self , func , component , args = None ):
1919 prefix = ""
2020 if component .component_name :
21- prefix = component .component_name + "::"
21+ prefix = component .component_name + "::"
2222
2323 self .func = func
24- self .name = prefix + func .__name__
24+ self .name = prefix + func .__name__
2525 self .component = component
2626 self .component_id = component ._component_id
2727
@@ -32,7 +32,7 @@ def __reduce__(self):
3232 return rebuild , (self .__class__ , self .func , self .component , self ._args )
3333
3434 def __repr__ (self ):
35- return "<" + self .__class__ .__name__ + " \" " + self .name + "\" >"
35+ return "<" + self .__class__ .__name__ + " \" " + self .name + "\" >"
3636
3737 def _after_init (self , args ):
3838 """Prepare the object"""
@@ -167,7 +167,7 @@ def _after_init(self, args):
167167 raise ValueError ("Invalid command name: %s" % args ["name" ])
168168
169169 # This regex will match all commands pointed to this bot
170- self ._regex = re .compile (r'^\/' + args ["name" ]+ r'(@[a-zA-Z0-9_]+)?'
170+ self ._regex = re .compile (r'^\/' + args ["name" ] + r'(@[a-zA-Z0-9_]+)?'
171171 r'( .*)?$' )
172172
173173 def _call (self , bot , update ):
@@ -178,7 +178,7 @@ def _call(self, bot, update):
178178 match = self ._regex .match (text )
179179 if not match :
180180 return
181- if match .group (1 ) and match .group (1 ) != "@" + bot .itself .username :
181+ if match .group (1 ) and match .group (1 ) != "@" + bot .itself .username :
182182 return
183183
184184 args = _command_args_split_re .split (text )[1 :]
0 commit comments