toggle_no_paid_messages_exception()¶
- async Client.toggle_no_paid_messages_exception()¶
Let a user message you without paying Telegram Stars, or make them pay again.
Usable by Users Bots- Parameters:
user_id (
int|str) – Unique identifier (int) or username (str) of the user.require_payment (
bool, optional) – Pass True to make the user pay again. By default the user can message for free.refund_charged (
bool, optional) – Pass True to also refund the Stars the user already paid.chat_id (
int|str, optional) – Unique identifier (int) or username (str) of a channel, to change the exception for the direct messages of that channel instead of the current user.
- Returns:
bool– On success, True is returned.
Example
await app.toggle_no_paid_messages_exception("username", refund_charged=True) await app.toggle_no_paid_messages_exception("username", require_payment=True)