Usage for picarto, piczel, and twitch - Silari/DBContext GitHub Wiki
Currently there are 3 external contexts included with dbcontexts - picarto, twitch, and piczel. All three are meant to provide notifications when streams on those services come online. As such, they all share most of the same available commands and options, though the output is slightly different for each based on what info the API provides. Note that each is called and configured separately - they each have their own listening channel, list of streams to watch, options, etc. The channel can of course be set the same for all three, but they must each be setup individually. All three contexts are currently limited to 100 watched streams per server each.
These require the bot mention to be placed first, then the context you wish to use, then the command, then any needed parameters. For example, "@PicartoWatch twitch add AngriestPat" or for 1.5 "/twitch add AngriestPat" would make the twitch context give a notification when the AngriestPat channel on Twitch.tv started streaming. Streams are tracked to see which new streams come online, and which are no longer online. A short delay, roughly 10 minutes, is needed for streams to be marked as offline to prevent spamming online notifications for streams which repeatedly restart.
Sets the channel to use for the context - notifications of new streams and responses for certain commands will be put here. As such, certain commands will not work until a listen channel is set. If no channel is given, the channel it is used in will be used.
Temporarily stops announcements, even if specifically requested through announce or similar commands. Previous announcements will still be edited normally. No settings are changed.
Resume announcements after the stop command.
Sets one or more options, separated by spaces, for the context. Multiple options from the same group are allowed, but only the last will be preserved. If any of the given options are unknown, the response will list them. Options are separated into groups, with multiple options within each group. Using the 'clear' option will set all option groups to their defaults.
One of 'default', 'noprev', 'simple'
- default is the standard embedded message - this typically includes the streamers avatar, a preview of the stream, how long the stream has lasted, the number of viewers, channel description, and some other information as provided by the API - exact details differ between the three contexts due to provided information.
- noprev is similar to the default option, but the stream preview is not included, which leads to a smaller embed which may be preferable.
- simple is a short text message with the streamer name and a link to watch the streamer without any embedding.
One of 'edit', 'delete', 'static'
- edit is the default option and updates the notification to update changes in the stream, such as viewer counts, game played, multistream status, etc. Once the stream has passed the offline timeout (currently 10 minutes) the message is edited to say the user is no longer online, and no further edits are made. Additionally, if the API fails multiple updates all current announcements will be edited to note this, and no further edits are made until the API successfully updates.
- delete is the same as edit, except that after the stream has reached the offline timeout the message is deleted.
- static messages are not edited or deleted in any way.
One of 'showadult', 'hideadult', 'noadult'
- showadult is the default option and shows all streams normally, regardless if the API has marked them as adult.
- hideadult disables the stream preview in the embed if the API marks the stream as adult. If a stream is marked as adult after announcement the stream preview will be removed when the message is edited, if edits are enabled.
- noadult will not announce any streams that the API marks as adult. If a stream is marked as adult after announcement it works the same as the hideadult option. DO NOT RELY ON THIS OPTION TO 100% SHIELD YOUR USERS FROM ADULT CONTENT. If the streamer does not enable their adult option, or if an image preview is not updated, adult content may still be displayed.
This command works similarly to the 'option' command, except the given options are set only for a specific stream. If no options are given, any currently set overrides are listed. A channel can be mentioned to set the announcement channel for this stream to that channel instead. The 'clear' option will again remove any set options, including any set channel.
You MUST be watching a stream to set options for it, and removing the stream will unset all options.
This will output the listen channel, all watched streams (this may be quite large!), as well as the currently set options. If the last API update for the context failed, it will be noted at the end of the message.
Adds one or more streams, separated by spaces, to the list of watched streams. Any trailing commas are automatically removed, to facilitate easily re-adding all channels given by the list command. The API is used to verify that the stream exists, and to correct case. Attempting to add 'angriestpat' to the twitch context will correct the channel name to 'AngriestPat', since some uses of the API and Python are case sensitive. If the API says the stream does not exist, the bot will not add the stream and return an error message. Additionally, if a single stream is currently online it will be immediately announced.
If a channel is mentioned anywhere in the list, than the stream announcement for each channel will be sent to that channel instead of the one specified by #listen. Note that using multiple channel mentions will set all streams to use the FIRST mentioned channel.
Removes one or more streams, separated by spaces. Any trailing commas are automatically removed, to facilitate easily removing all channels given by the list command. Note that this is case sensitive. The proper case can be seen by using the list command if needed. A list of all successful removals and a list of failed removals will be in the response, if any.
Provides a notification of a streams status similar to the default type online notification. The given information is typically more detailed, as the API usually provides more. Note that several context options do not apply to this message: it is not edited or deleted by the bot, and the message type option is ignored. However, an adult stream will have it's preview disabled if the adult option is not 'showadult'. The message is always sent to the announcement channel set for the context.
Provides help for the context. Using help may provide additional help for the given command. The information given is generally a condensed version of the information given here.