Skip to content

Commit

Permalink
chore: UserActions.get_mention メソッドを非推奨に
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Feb 21, 2024
1 parent 0e8f8b4 commit 26d0f4e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mipac/actions/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from mipac.utils.cache import cache
from mipac.utils.format import remove_dict_empty
from mipac.utils.pagination import Pagination
from mipac.utils.util import deprecated

if TYPE_CHECKING:
from mipac.manager.client import ClientManager
Expand Down Expand Up @@ -959,14 +960,17 @@ async def fetch(
user_id=user_id, username=username, host=host, user_ids=user_ids, cache_override=True
)

def get_mention(self, user: PartialUser) -> str: # TODO: モデルに移す
"""
Get mention name of user.
@deprecated
def get_mention(self, user: PartialUser) -> str:
"""対象のユーザーのメンションを取得します
.. deprecated:: 0.6.3
:meth:`mipac.models.user.PartialUser._get_mention` を使用することを推奨します。
Parameters
----------
user : Optional[User], default=None
The object of the user whose mentions you want to retrieve
user : PartialUser
対象のユーザー
Returns
-------
Expand Down

0 comments on commit 26d0f4e

Please sign in to comment.