Skip to content

Commit 3a8ddce

Browse files
committed
♻️ remove NameplatePalette enum and change palette type to str
1 parent 06b0e9b commit 3a8ddce

4 files changed

Lines changed: 4 additions & 75 deletions

File tree

discord/collectibles.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from .state import ConnectionState
2929

3030
from .asset import Asset
31-
from .enums import NameplatePalette
3231
from .types.collectibles import Nameplate as NameplatePayload
3332

3433

@@ -42,13 +41,13 @@ class Nameplate:
4241
----------
4342
sku_id: int
4443
The SKU ID of the nameplate.
45-
palette: NameplatePalette
44+
palette: str
4645
The color palette of the nameplate.
4746
"""
4847

4948
def __init__(self, data: NameplatePayload, state: "ConnectionState") -> None:
5049
self.sku_id: int = data["sku_id"]
51-
self.palette: NameplatePalette = data["palette"]
50+
self.palette: str = data["palette"]
5251
self._label: str = data["label"]
5352
self._asset: str = data["asset"]
5453
self._state: "ConnectionState" = state
@@ -73,4 +72,4 @@ def get_asset(self, animated: bool = False) -> Asset:
7372
)
7473

7574

76-
__all__ = ("Nameplate", "NameplatePalette")
75+
__all__ = ("Nameplate",)

discord/enums.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,25 +1078,6 @@ class SubscriptionStatus(Enum):
10781078
inactive = 2
10791079

10801080

1081-
class NameplatePalette(Enum):
1082-
"""A nameplate color palette.
1083-
1084-
.. versionadded:: 2.7
1085-
"""
1086-
1087-
crimson = "crimson"
1088-
berry = "berry"
1089-
sky = "sky"
1090-
teal = "teal"
1091-
forest = "forest"
1092-
bubble_gum = "bubble_gum"
1093-
violet = "violet"
1094-
cobalt = "cobalt"
1095-
clover = "clover"
1096-
lemon = "lemon"
1097-
white = "white"
1098-
1099-
11001081
T = TypeVar("T")
11011082

11021083

discord/types/collectibles.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626

2727
from typing import TypedDict
2828

29-
from ..enums import NameplatePalette
3029
from .snowflake import Snowflake
3130

3231

3332
class Nameplate(TypedDict):
3433
sku_id: Snowflake
3534
asset: str
3635
label: str
37-
palette: NameplatePalette
36+
palette: str

docs/api/enums.rst

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,53 +2519,3 @@ of :class:`enum.Enum`.
25192519
.. attribute:: inactive
25202520
25212521
The subscription is inactive and the subscription owner is not being charged.
2522-
2523-
.. class:: NameplatePalette
2524-
2525-
A nameplate color palette.
2526-
2527-
.. versionadded:: 2.7
2528-
2529-
.. attribute:: crimson
2530-
2531-
Crimson nameplate color palette.
2532-
2533-
.. attribute:: berry
2534-
2535-
Berry nameplate color palette.
2536-
2537-
.. attribute:: sky
2538-
2539-
Sky nameplate color palette.
2540-
2541-
.. attribute:: teal
2542-
2543-
Teal nameplate color palette.
2544-
2545-
.. attribute:: forest
2546-
2547-
Forest nameplate color palette.
2548-
2549-
.. attribute:: bubble_gum
2550-
2551-
Bubble_gum nameplate color palette.
2552-
2553-
.. attribute:: violet
2554-
2555-
Violet nameplate color palette.
2556-
2557-
.. attribute:: cobalt
2558-
2559-
Cobalt nameplate color palette.
2560-
2561-
.. attribute:: clover
2562-
2563-
Clover nameplate color palette.
2564-
2565-
.. attribute:: lemon
2566-
2567-
Lemon nameplate color palette.
2568-
2569-
.. attribute:: white
2570-
2571-
White nameplate color palette.

0 commit comments

Comments
 (0)