mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
11 lines
398 B
Python
11 lines
398 B
Python
_emote_type_predicates = {
|
|
'': lambda _: True, # allow usage as a "consume rest" converter
|
|
'all': lambda _: True,
|
|
'static': lambda e: not e.animated,
|
|
'animated': lambda e: e.animated}
|
|
|
|
def emote_type_filter(argument):
|
|
try:
|
|
return _emote_type_predicates[argument.lower()]
|
|
except KeyError:
|
|
raise commands.BadArgument('Invalid emote type. Specify “static”, “animated”, “all”.')
|