File tree Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Expand file tree Collapse file tree 1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -655,11 +655,25 @@ def decorator(func):
655
655
return decorator
656
656
657
657
658
- discord .commands .options .Option = BridgeOption
659
- discord .Option = BridgeOption
660
- warn_deprecated (
661
- "Option" ,
662
- "BridgeOption" ,
663
- "2.5" ,
664
- reference = "https://github.com/Pycord-Development/pycord/pull/2417" ,
665
- )
658
+ # TODO: Fix this, it doesn't work if discord.Option is imported before discord.ext.bridge
659
+
660
+
661
+ # TODO: 2.7: Remove this
662
+ class BridgeOptionDeprecated (BridgeOption ):
663
+ @staticmethod
664
+ def _warn ():
665
+ warn_deprecated (
666
+ "Option" ,
667
+ "BridgeOption" ,
668
+ "2.5" ,
669
+ "2.7" ,
670
+ reference = "https://github.com/Pycord-Development/pycord/pull/2417" ,
671
+ )
672
+
673
+ def __init__ (self , * args , ** kwargs ):
674
+ self ._warn ()
675
+ super ().__init__ (* args , ** kwargs )
676
+
677
+
678
+ discord .commands .options .Option = BridgeOptionDeprecated
679
+ discord .Option = BridgeOptionDeprecated
You can’t perform that action at this time.
0 commit comments