Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
1.97k stars 442 forks source link

feat: allow timeout-related commands to be used in multiple channels #5402

Closed pajlada closed 3 weeks ago

pajlada commented 1 month ago

This PR changes the behaviour of the following commands:

All of those commands now accept one or more --channel parameters to override which channel the action should take place in. The --channel parameter accepts a channel ID or channel name with the same syntax as the other "user targets" do (e.g. id:11148817 or pajlada)

examples Ban user in the chat you're typing in:
/ban weeb123

Ban user in the chat you're typing in, with a reason specified:
/ban weeb123 the ban reason

Ban user in a separate chat, with a reason specified:
/ban --channel pajlada weeb123 the ban reason

Ban user in two separate chats, with a reason specified:
/ban --channel pajlada --channel id:117166826 weeb123 the ban reason

Timeout user in the chat you're typing in:
/timeout weeb123

Timeout user in the chat you're typing in, with a reason specified:
/timeout weeb123 10m the timeout reason

Timeout user in a separate chat, with a reason specified:
/timeout --channel pajlada weeb123 10m the timeout reason

Timeout user in two separate chats, with a reason specified:
/timeout --channel pajlada --channel id:117166826 weeb123 10m the timeout reason

Unban user in the chat you're typing in:
/unban weeb123

Unban user in a separate chat:
/unban --channel pajlada weeb123

Unban user in two separate chats:
/unban --channel pajlada --channel id:117166826 weeb123

jupjohn commented 1 month ago

In your example, you're using raw IDs but in other commands IDs have to be prefixed with id:. Could the same behaviour be used here to support both channel names & IDs? Keeps it consistent.

Also, are ---prefixed arguments used anywhere else? I don't have a better idea, but they feel very programmer-y which might feel weird to users.

pajlada commented 1 month ago

-- prefixes are used in /openurl - I'm ok with them being a bit programmery since this use case is a bit programmery

I'm fine with --channel accepting the same type of input, e.g. 11148817 or pajlada