Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
BF
Browse files Browse the repository at this point in the history
  • Loading branch information
bleudev committed Aug 10, 2022
1 parent a46d2c8 commit a48ce85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions disspy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ def __all__(self) -> list:
"""
return [self.ONLINE, self.DND, self.INVISIBLE, self.IDLE]

def __str__(self) -> str:
return self.ONLINE


@final
@unique
Expand Down Expand Up @@ -159,6 +162,9 @@ def __all__(self) -> list:
self.ON_MESSAGED, self.ON_DMESSAGEC, self.ON_DMESSAGEU,
self.ON_DMESSAGED, self.ON_CLOSE, self.ON_REACTION,
self.ON_REACTIONR, self.ON_TYPING, self.ON_DM_TYPING]

def __str__(self) -> str:
return self.ON_READY


@final
Expand Down
9 changes: 1 addition & 8 deletions disspy/typ.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ def __new__(cls, *args) -> type:
:param kwargs: No
:return type:
"""
_type: type = list(args)[0]
_obj: _type = _type()
_all: list = _obj.__all__()

if str(_all[0]).isdigit():
return int
else:
return str
return int if str(list(args)[0]).isdigit() else str


class Event:
Expand Down

0 comments on commit a48ce85

Please sign in to comment.