From 44db6927c450aa2029d505d88669ec22192c69ef Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 14 Jan 2022 16:34:26 +0100 Subject: [PATCH] oops kwarg --- aiocraft/mc/definitions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiocraft/mc/definitions.py b/aiocraft/mc/definitions.py index 20f2092..4d682c4 100644 --- a/aiocraft/mc/definitions.py +++ b/aiocraft/mc/definitions.py @@ -125,10 +125,10 @@ class Enchantment: type : EnchantmentType level : int - def __init__(self, type:EnchantmentType=None, eid:int=None, level:int=1): - if not type and not eid: + def __init__(self, type:EnchantmentType=None, id:int=None, level:int=1): + if not type and not id: raise ValueError("No enchantment type or enchantment id provided") - self.type = type or EnchantmentType(eid) + self.type = type or EnchantmentType(id) self.eid = self.type.value self.level = level