Skip to content

[Enhancement]: No way of setting token_for when using ChatMessage.respond #521

@lusciousdev

Description

@lusciousdev

What actually happened?

In order to send a message using the User Access Token, the token_for value must be set in the PartialChatter.send_message call, but ChatMessage.respond does not set this or have a way to set this.

What did you expect to happen instead?

Perhaps add a flag to ChatMessage.respond to use the User Access Token of the Bot, assuming it exists.

Also, it may be helpful for the documentation to mention that the token_for parameter must be set in order to use the User Access Token and avoid authentication issues when sending messages in chat channels where the broadcaster has not given channel:bot scope.

Minimum reproducible example:

Steps to reproduce the problem

Subscribe to event_messages in a channel where you do not have "channel:bot" scope, attempt to respond to a message. You will get a 401 authentication error from the helix endpoint.

Additional logs:

No response

System and Environment information

Twitchio v3.1.0
Python v3.13.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Addressed in next releaseThis issue will be closed when the next release is createdNew FeatureImplements new features

    Projects

    Status

    Planned (Future Release)

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions