You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably want to decorate the decorator to keep no-arg support. This is what we use in vcrutils:
defdual_decorator(func):
"""This is a decorator that converts a paramaterized decorator for no-param use. source: http://stackoverflow.com/questions/3888158 """@wraps(func)definner(*args, **kw):
if ((len(args) ==1andnotkwandcallable(args[0])
andnot (type(args[0]) ==typeandissubclass(args[0], BaseException)))):
returnfunc()(args[0])
else:
returnfunc(*args, **kw)
returninner
I'd like to add support for emoji in bot commands. This would allow bots to receive messages likes
bot: :scissors:
.One idea for implementation is to have the
command
decorator take in optional arguments, so you could write the following:Thoughts?
The text was updated successfully, but these errors were encountered: