Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
synodriver authored Nov 19, 2022
1 parent 4a4ea0b commit 4555258
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nonebot/internal/adapter/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def __repr__(self) -> str:

def __getattr__(self, name: str) -> "_ApiCall":
if name.startswith("__") and name.endswith("__"):
raise AttributeError
raise AttributeError(
f"'{self.__class__.__name__}' object has no attribute '{name}'"
)
return partial(self.call_api, name)

@property
Expand Down

0 comments on commit 4555258

Please sign in to comment.