File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55from inspect import iscoroutinefunction
66
77import discord
8- from discord .ext .commands import CommandOnCooldown , CooldownMapping
8+ from discord .ext .commands import CommandOnCooldown , CooldownMapping , BucketType
99
1010from . import error , http
1111from .dpy_overrides import ComponentMessage
@@ -138,7 +138,10 @@ def __init__(self, func):
138138 cooldown = None
139139 if hasattr (self .func , "__commands_cooldown__" ):
140140 cooldown = self .func .__commands_cooldown__
141- self ._buckets = CooldownMapping (cooldown )
141+ try :
142+ self ._buckets = CooldownMapping (cooldown )
143+ except TypeError :
144+ self ._buckets = CooldownMapping (cooldown , BucketType .default )
142145
143146 self ._max_concurrency = None
144147 if hasattr (self .func , "__commands_max_concurrency__" ):
You can’t perform that action at this time.
0 commit comments