[−][src]Module dishub::ops::add_feeds
This module contains the functions used only by the add_feeds subsystem.
The flow of the add_feeds subsystem is as follows:
Options::parse()
|> ops::add_feeds::verify()
// Read the subject
|> ops::add_feeds::get_watch_subject()
|> ops::AppTokens::read()
// Check if the subject exists
|> ops::add_feeds::verify_subject()
// Check which servers the bot's invited to and ask the user which one to post in.
|> ops::add_feeds::known_servers()
|> ops::add_feeds::get_valid_server()
// List channels in the specified server and ask the user which one to post in.
|> ops::add_feeds::channels_in_server()
|> ops::add_feeds::get_valid_channel()
// Update the feed list
|> ops::Feed::read()
|> ops::Feed::new()
|> ops::Feed::write()
Functions
| channels_in_server |
List the channels in the specified server. |
| get_valid_channel |
Prompt the user to choose a channel to post in, given a list of channels. |
| get_valid_server |
Prompt the user to choose a server to post in, given a list of servers. |
| get_watch_subject |
Prompt the user for the subject to watch. |
| known_servers |
Get all servers the bot is invited to. |
| verify |
Verify if, given the current configuration, it's permitted to continue with the subsequent steps of the |
| verify_subject |
Verify, whether the subject exists. |