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 5
5
from inspect import iscoroutinefunction
6
6
7
7
import discord
8
- from discord .ext .commands import CommandOnCooldown , CooldownMapping
8
+ from discord .ext .commands import BucketType , CommandOnCooldown , CooldownMapping
9
9
10
10
from . import error , http
11
11
from .dpy_overrides import ComponentMessage
@@ -138,7 +138,10 @@ def __init__(self, func):
138
138
cooldown = None
139
139
if hasattr (self .func , "__commands_cooldown__" ):
140
140
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 )
142
145
143
146
self ._max_concurrency = None
144
147
if hasattr (self .func , "__commands_max_concurrency__" ):
You can’t perform that action at this time.
0 commit comments