give_money#

PyPtt.API.give_money(self, ptt_id: str, money: int, red_bag_title: str | None = None, red_bag_content: str | None = None) None

轉帳,詳見 P 幣

參數:
  • ptt_id (str) – PTT ID。

  • money (int) – 轉帳金額。

  • red_bag_title (str) – 紅包標題。

  • red_bag_content (str) – 紅包內容。

回傳:

None

引發:

範例:

import PyPtt

ptt_bot = PyPtt.API()
try:
    # .. login ..
    ptt_bot.give_money(ptt_id='CodingMan', money=100)
    # or
    ptt_bot.give_money('CodingMan', 100, red_bag_title='紅包袋標題', red_bag_content='紅包袋內文')
    # .. do something ..
finally:
    ptt_bot.logout()