Skip to content

Methods

Tomato6966 edited this page Jul 1, 2021 · 10 revisions

See all Methods for discord-yt-poster:

🧾 Methods - Table of Content


YTP#setChannel() -> Response <-> ^ GO UP ^

/** Set a new YTChannel to a Guild ID
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 * @param {OBJECT|DiscordChannel} DiscordChannel DiscordChannel with ID && guild parameters
 * @param {OBJECT|DiscordUser} DiscordUser DiscordUser with ID parameter. who owns the Link
 * @param {string} Notification Notification Message | OPTIONAL | DEFAULT: uses the options
 * @param {Boolean} preventDuplicates Default: True
 * Returns
*/

YTP.setChannel(ChannelLink, DiscordChannel, DiscordUser, Notification = this.options.defaults.Notification, preventDuplicates = true)

YTP#getChannel() -> Response <-> ^ GO UP ^

/** Get YTChannel for LINK
 * @param {string} DiscordGuildID Discord Guild id
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 */

YTP.getChannel(DiscordGuildID, ChannelLink)

YTP#getChannels4User() -> Response <-> ^ GO UP ^

/** Get YTChannels for User
 * @param {string} DiscordGuildID Discord Guild id
 * @param {OBJECT|DiscordUser} DiscordUser DiscordUser with ID parameter
 */

YTP.getChannels4User(DiscordGuildID, DiscordUser)

YTP#editChannel() -> Response <-> ^ GO UP ^

/** Edit a specific YTChannel in a Guild ID
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 * @param {OBJECT|DiscordChannel} DiscordChannel DiscordChannel with ID && guild parameters
 * @param {OBJECT|DiscordUser} DiscordUser DiscordUser with ID parameter. who owns the Link
 * @param {string} Notification Notification Message | OPTIONAL | DEFAULT: uses the options
*/

YTP.editChannel(ChannelLink, DiscordChannel, DiscordUser, Notification = this.options.defaults.Notification)

YTP#deleteChannel() -> Response <-> ^ GO UP ^

/** Delete a specific YTChannel in a Guild
 * @param {string} DiscordGuildID Discord Guild id
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 */

YTP.deleteChannel(DiscordGuildID, ChannelLink)

YTP#getAllChannels() -> Response <-> ^ GO UP ^

/** Gets all Channels of a Guild
 * @param {string} DiscordGuildID Discord Guild id
 */

YTP.getAllChannels(DiscordGuildID)

YTP#deleteAllChannels() -> Response <-> ^ GO UP ^

/** Delete all Channels in a GUild
 * @param {string} DiscordGuildID Discord Guild id
 */

YTP.deleteAllChannels(DiscordGuildID)

YTP#getChannelInfo() -> Response <-> ^ GO UP ^

/** Get Channel Information about a LINK
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 */

YTP.getChannelInfo(YOUTUBECHANNELLINK)

YTP#getLatestVideos() -> Response <-> ^ GO UP ^

/** Get Videos of a LINK
 * @param {string} ChannelLink Youtube Channel Link, example: https://youtube.com/c/Tomato6966
 */

YTP.getLatestVideos(YOUTUBECHANNELLINK)