Skip to content

Commit a2ffb9b

Browse files
committed
CustomReward.delete token_for default to broadcaster.
1 parent a70431e commit a2ffb9b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

twitchio/models/channel_points.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,16 @@ def get_image(self, size: Literal["1x", "2x", "4x"] = "2x", use_default: bool =
220220

221221
return Asset(url, http=self._http)
222222

223-
async def delete(self, *, token_for: str) -> None:
223+
async def delete(self) -> None:
224224
"""Delete the custom reward.
225225
226226
The app used to create the reward is the only app that may delete it.
227227
If the reward's redemption status is UNFULFILLED at the time the reward is deleted, its redemption status is marked as FULFILLED.
228228
229229
.. note::
230230
Requires a user access token that includes the ``channel:manage:redemptions`` scope.
231-
232-
Parameters
233-
-----------
234-
token_for: str
235-
The user's token that has permission delete the reward.
236231
"""
237-
await self._http.delete_custom_reward(broadcaster_id=self.broadcaster.id, reward_id=self.id, token_for=token_for)
232+
await self._http.delete_custom_reward(broadcaster_id=self.broadcaster.id, reward_id=self.id, token_for=self.broadcaster.id)
238233

239234
async def update(
240235
self,

twitchio/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,9 @@ async def fetch_followers(
623623

624624
async def create_custom_reward(
625625
self,
626-
*,
627626
title: str,
628627
cost: int,
628+
*,
629629
prompt: str | None = None,
630630
enabled: bool = True,
631631
background_color: str | Colour | None = None,

0 commit comments

Comments
 (0)