Comments (6)
I agree on that. I thought we changed them all already but semms like I was wrong
from twitchlib.client.
Looking at the extension method TimeoutUser, 1 of the methods already contains the possibility to provide a channel:
public static void TimeoutUser(this ITwitchClient client, string channel, string viewer, TimeSpan duration, string message = "", bool dryRun = false)
public static void TimeoutUser(this ITwitchClient client, JoinedChannel channel, string viewer, TimeSpan duration, string message = "", bool dryRun = false)
There is however, another method which doesn't require the channel as the first parameter:
public static void TimeoutUser(this ITwitchClient client, string viewer, TimeSpan duration, string message = "", bool dryRun = false)
Would you recommend removing the last method?
This also raises a question, why does the SendMessage method require a channel parameter? What was wrong with using an implementation as in the last TimeoutUser method? (Except for the fact that it doesn't provide any feedback if you're not connected to any channel)
from twitchlib.client.
I had forgotten I intentially added an override method that doesn't accept a channel, and instead sends the message using the first JoinedChannel object in the JoinedChannels list. This kind of method is kind of contrary to the direction we've gone in requiring channel, and I think it's probably good practice to have the programmer explicitely state which channel they're sending the message (or in this case, the time out to).
Thoughts @RRickkert @LuckyNoS7evin @Syzuna ?
from twitchlib.client.
Everything else is this way it would only make sense to continue
from twitchlib.client.
Agree, the reason we went down the specification of channel on every request was due to "hidden functionality with no warnings" for example this picked JoinedChannels[0] which threw an exception of there was no joined channel. It also caused issues for those that do join multiple channels as you could not guarantee what channel is in [0].
That's my two cents though
from twitchlib.client.
This has been fixed.
from twitchlib.client.
Related Issues (20)
- System.StackOverflowException HOT 1
- Support deleting individual messages HOT 4
- autojoin channel not rejoined after reconnect since version 3.2.0.0 HOT 2
- Client_OnConnected OnConnectedArgs e.AutoJoinChannel NULL HOT 2
- OnModeratorJoined apparently not firing HOT 1
- ChatReply Message Content HOT 3
- Twitch Client, No Permissions HOT 4
- Unaccounted for: Login authentication failed HOT 1
- Client events not firing? HOT 17
- Cannot send message no_permission HOT 5
- Events terminate early? HOT 3
- Automatic reconnect after disconnect HOT 10
- OnChannelStateChanged issues with Followers-only mode HOT 1
- After using LeaveChannel I can't JoinChannel back HOT 2
- Async void Events HOT 1
- Fix Emote Sets parsing and MessageEmoteCollection HOT 1
- Refactor USERNOTICE state models like`Announcement`, `Subscriber`, etc. HOT 8
- GetChannelModerators() does not work HOT 6
- EmoteExtractor breaks on messages with emoji HOT 3
- Login authentication failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitchlib.client.