- createPoll
auto createPoll(TwitchPlugin plugin, string channelName, string title, string durationString, string[] choices, string caller)
Creates a Twitch poll in the specified channel.
- deleteMessage
auto deleteMessage(TwitchPlugin plugin, string channelName, string messageID, string caller)
Deletes a message, or all messages in a channel.
- endPoll
auto endPoll(TwitchPlugin plugin, string channelName, string pollID, bool terminate, string caller)
Ends a Twitch poll, putting it in either a "TERMINATED" or "ARCHIVED" state.
- getBotList
auto getBotList(TwitchPlugin plugin, string caller)
Fetches a list of known (online) bots from TwitchInsights.net.
- getBroadcasterAuthorisation
auto getBroadcasterAuthorisation(TwitchPlugin plugin, string channelName)
Returns a broadcaster-level "Bearer" authorisation token for a channel,
where such exist.
- getChannel
auto getChannel(TwitchPlugin plugin, string channelName, ulong channelID, string caller)
Fetches information about a channel; its title, what game is being played,
the channel tags, etc.
- getChatters
auto getChatters(TwitchPlugin plugin, string broadcaster, string caller)
Get the JSON representation of everyone currently in a broadcaster's channel.
- getFollowers
auto getFollowers(TwitchPlugin plugin, ulong id, string caller)
Fetches a list of all followers of the passed channel and caches them in
the channel's entry in TwitchPlugin.rooms.
- getGame
auto getGame(TwitchPlugin plugin, string name, ulong id, string caller)
Fetches information about a game; its numerical ID and full name.
- getPolls
auto getPolls(TwitchPlugin plugin, string channelName, string pollIDString, string caller)
Fetches information about polls in the specified channel. If an ID string is
supplied, it will be included in the query, otherwise all "ACTIVE" polls
are included in the returned Voldemorts.
- getStream
auto getStream(TwitchPlugin plugin, string loginName, string caller)
Fetches information about an ongoing stream.
- getSubscribers
auto getSubscribers(TwitchPlugin plugin, string channelName, bool totalOnly, string caller)
Fetches a list of all subscribers of the specified channel. A broadcaster-level
access token is required.
- getUser
auto getUser(TwitchPlugin plugin, string name, ulong id, bool searchByDisplayName, string caller)
Fetches information about a Twitch user and returns it in the form of a
Voldemort struct with nickname, display name and account ID members.
- getValidation
auto getValidation(TwitchPlugin plugin, string authToken, bool async, string caller)
Validates an access key, retrieving information about it.
- handleRetryDelegateException
auto handleRetryDelegateException(Exception base, size_t i, bool endlessly, bool headless)
- modifyChannelImpl
auto modifyChannelImpl(TwitchPlugin plugin, string channelName, string title, ulong gameID, string caller)
Modifies a channel's title or currently played game. Implementation function.
- printRetryDelegateException
void printRetryDelegateException(Exception base)
Prints out details about exceptions passed from retryDelegate.
retryDelegate itself rethrows them when we return, so no need to do that here.
- retryDelegate
auto retryDelegate(TwitchPlugin plugin, Dg dg, bool async, bool endlessly, Duration retryDelay)
Retries a passed delegate until it no longer throws or until the hardcoded
number of retries
(TwitchPlugin.delegateRetries)
is reached, or forever if endlessly is passed.
- sendAnnouncement
auto sendAnnouncement(TwitchPlugin plugin, ulong channelID, string message, string colour, string caller)
Sends a Twitch chat announcement.
- sendShoutout
auto sendShoutout(TwitchPlugin plugin, ulong sourceChannelID, ulong targetChannelID, string caller)
Sends a native Twitch shoutout.
- sendWhisper
auto sendWhisper(TwitchPlugin plugin, ulong userID, string message, string caller)
Sends a whisper to a user.
- setChannelGame
auto setChannelGame(TwitchPlugin plugin, string channelName, ulong gameID, string caller)
Changes the currently streamed game of a channel.
- setChannelTitle
auto setChannelTitle(TwitchPlugin plugin, string channelName, string title, string caller)
Changes the title of a channel.
- startCommercial
auto startCommercial(TwitchPlugin plugin, string channelName, string lengthString, string caller)
Starts a commercial in the specified channel.
- timeoutUser
auto timeoutUser(TwitchPlugin plugin, string channelName, ulong userID, uint durationSeconds, string reason, string caller, bool recursing)
Times out a user in a channel.
- warnUser
auto warnUser(TwitchPlugin plugin, ulong channelID, ulong userID, string reason, string caller)
Warns a user in a channel.
Functions for accessing the Twitch API. For internal use.