[Enhance] API for presents & character values

- Add API endpoints for presents
- Change character value algorithm
- Update character values (I forgot in v2.10.3)
This commit is contained in:
Lost-MSth
2023-02-10 18:15:53 +08:00
parent 6f39274b99
commit 7ece2598d1
8 changed files with 267 additions and 47 deletions

View File

@@ -333,7 +333,8 @@ class ItemFactory:
elif item_type == 'course_banner':
return CourseBanner(self.c)
else:
raise InputError('The item type `%s` is wrong.' % item_type)
raise InputError(
f'The item type `{item_type}` is invalid.', api_error_code=-120)
@classmethod
def from_dict(cls, d: dict, c=None):