ChannelSubscriber

Namespace

ChannelSubscriber

Description:
  • Channel Subscriber

Source:

Classes

ChannelSubscriber
DiscordNotification

Members

(static, constant) bot

Source:
Properties:
Type Attributes Description
Bot <nullable>

Methods

(static) clearNotification(discord_notification) → {Promise}

Description:
  • Delete notification message from telegram chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriberDiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(async, static) deleteNotification(chat_id, channel_id) → {Promise}

Description:
  • Interface for deleting the notification data for discord channe from telegram chat

Source:
Parameters:
Name Type Description
chat_id number | string
channel_id string
Returns:
Type
Promise

(static) editNotificationMessage(discord_notification) → {Promise}

Description:
  • Edit existing notification message with current notification data

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(static) getDiscordNotification(notification_data, chat_id) → {ChannelSubscriberDiscordNotification}

Description:
  • Get DiscordNotification for supplied notification_data

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotificationData | ChannelSubscriber.DiscordNotification | null

Source data

chat_id string | number

Telegram chat id

Returns:
Type
ChannelSubscriberDiscordNotification

(static) isNotificationMessage(chat_id, message_id) → {boolean}

Description:
  • Interface for checking that telegram message in chat is a notification message

Source:
Parameters:
Name Type Description
chat_id string | number
message_id string | number
Returns:
Type
boolean

(static) pinNotificationMessage(discord_notification) → {Promise.<Message>}

Description:
  • Pin notification message in chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification
Returns:
Type
Promise.<Message>

(async, static) restoreMessageID(chat_id, channel_id) → {number|null}

Description:
  • Restores the last used message id for notification in telegram chat from Redis

Source:
Parameters:
Name Type Description
chat_id string

Telegram chat id

channel_id string

Id of the discord channel that triggered notification

Returns:

message id in the telegram chat

Type
number | null

(async, static) sendNotification(notification_data, chat_id) → {Promise}

Description:
  • Interface for sending / updating the notification message from notification data

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotificationData
chat_id number | string
Returns:
Type
Promise

(static) sendNotificationMessage(discord_notification) → {Promise}

Description:
  • Send notification message to telegram chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(async, static) wrapInCooldown(notification_data, chat_id) → {Promise}

Description:
  • Wraps the send / update of the notificatin data to telegram chat

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotification

Source notification data

chat_id number | string

Telegram chat id

Returns:
Type
Promise

Type Definitions

DiscordNotificationData

Source:
Properties:
Name Type Attributes Description
channel_id string
channel_name string
channel_url string
channel_type 'voice' | 'text' | 'announcements' | 'forum' | 'stage' | undefined
guild_id string
guild_name string
members Array.<object>
members[].user_id string
members[].user_name string
members[].streaming boolean
members[].member_id string
members[].member_name string
members[].muted boolean
members[].deafened boolean
members[].camera boolean
members[].activity string <nullable>
Type:
  • object

Namespace

ChannelSubscriber

Description:
  • Channel Subscriber

Source:

Classes

ChannelSubscriber
DiscordNotification

Members

(static, constant) bot

Source:
Properties:
Type Attributes Description
Bot <nullable>

Methods

(static) clearNotification(discord_notification) → {Promise}

Description:
  • Delete notification message from telegram chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriberDiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(async, static) deleteNotification(chat_id, channel_id) → {Promise}

Description:
  • Interface for deleting the notification data for discord channe from telegram chat

Source:
Parameters:
Name Type Description
chat_id number | string
channel_id string
Returns:
Type
Promise

(static) editNotificationMessage(discord_notification) → {Promise}

Description:
  • Edit existing notification message with current notification data

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(static) getDiscordNotification(notification_data, chat_id) → {ChannelSubscriberDiscordNotification}

Description:
  • Get DiscordNotification for supplied notification_data

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotificationData | ChannelSubscriber.DiscordNotification | null

Source data

chat_id string | number

Telegram chat id

Returns:
Type
ChannelSubscriberDiscordNotification

(static) isNotificationMessage(chat_id, message_id) → {boolean}

Description:
  • Interface for checking that telegram message in chat is a notification message

Source:
Parameters:
Name Type Description
chat_id string | number
message_id string | number
Returns:
Type
boolean

(static) pinNotificationMessage(discord_notification) → {Promise.<Message>}

Description:
  • Pin notification message in chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification
Returns:
Type
Promise.<Message>

(async, static) restoreMessageID(chat_id, channel_id) → {number|null}

Description:
  • Restores the last used message id for notification in telegram chat from Redis

Source:
Parameters:
Name Type Description
chat_id string

Telegram chat id

channel_id string

Id of the discord channel that triggered notification

Returns:

message id in the telegram chat

Type
number | null

(async, static) sendNotification(notification_data, chat_id) → {Promise}

Description:
  • Interface for sending / updating the notification message from notification data

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotificationData
chat_id number | string
Returns:
Type
Promise

(static) sendNotificationMessage(discord_notification) → {Promise}

Description:
  • Send notification message to telegram chat

Source:
Parameters:
Name Type Description
discord_notification ChannelSubscriber.DiscordNotification

DiscordNotification that is associated with notification message

Returns:
Type
Promise

(async, static) wrapInCooldown(notification_data, chat_id) → {Promise}

Description:
  • Wraps the send / update of the notificatin data to telegram chat

Source:
Parameters:
Name Type Description
notification_data ChannelSubscriber.DiscordNotification

Source notification data

chat_id number | string

Telegram chat id

Returns:
Type
Promise

Type Definitions

DiscordNotificationData

Source:
Properties:
Name Type Attributes Description
channel_id string
channel_name string
channel_url string
channel_type 'voice' | 'text' | 'announcements' | 'forum' | 'stage' | undefined
guild_id string
guild_name string
members Array.<object>
members[].user_id string
members[].user_name string
members[].streaming boolean
members[].member_id string
members[].member_name string
members[].muted boolean
members[].deafened boolean
members[].camera boolean
members[].activity string <nullable>
Type:
  • object