Channel 類別

  • java.lang.Object
    • com.microsoft.bot.dialogs.choices.Channel

public final class Channel

判斷通道特定功能的方法。

方法摘要

修飾詞與類型 方法與描述
static java.lang.String getChannelId(TurnContext turnContext)

從回合內容上的目前活動取得通道標識碼。

static boolean hasMessageFeed(String channelId)

判斷通道是否有訊息摘要。

static int maxActionTitleLength(String channelId)

動作標題允許的最大長度。

static boolean supportsCardActions(String channelId)

判斷通道是否支援多個卡片動作。

static boolean supportsCardActions(String channelId, int buttonCnt)

判斷通道是否支援多個卡片動作。

static boolean supportsSuggestedActions(String channelId)

判斷通道是否支持數個建議動作。

static boolean supportsSuggestedActions(String channelId, int buttonCnt)

判斷通道是否支持數個建議動作。

方法繼承來源 java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

方法詳細資料

getChannelId

public static String getChannelId(TurnContext turnContext)

從回合內容上的目前活動取得通道標識碼。

參數:

turnContext - 要從中擷取活動的通道標識碼的回合內容。

傳回:

回合內容活動的通道標識碼。

hasMessageFeed

public static boolean hasMessageFeed(String channelId)

判斷通道是否有訊息摘要。

參數:

channelId - 要檢查訊息摘要的通道。

傳回:

如果通道有訊息摘要,則為 True,否則為 False。

maxActionTitleLength

public static int maxActionTitleLength(String channelId)

動作標題允許的最大長度。

參數:

channelId - 要判斷動作標題長度上限的通道。

傳回:

特定通道上動作標題所允許的字元總數。

supportsCardActions

public static boolean supportsCardActions(String channelId)

判斷通道是否支援多個卡片動作。

參數:

channelId - 要檢查卡片動作是否支援的通道。

傳回:

如果通道支援 buttonCnt 總卡片動作,則為 True,如果通道不支援該數目的卡片動作,則為 False。

supportsCardActions

public static boolean supportsCardActions(String channelId, int buttonCnt)

判斷通道是否支援多個卡片動作。

參數:

channelId - 要檢查卡片動作是否支援的通道。
buttonCnt - 要檢查通道的卡片動作數目。

傳回:

如果通道支援 buttonCnt 總卡片動作,則為 True,如果通道不支援該數目的卡片動作,則為 False。

supportsSuggestedActions

public static boolean supportsSuggestedActions(String channelId)

判斷通道是否支持數個建議動作。

參數:

channelId - 要檢查是否支持建議動作的通道。

傳回:

如果通道支援 buttonCnt total Suggested Actions,則為 True,如果通道不支援該數目的建議動作,則為 False。

supportsSuggestedActions

public static boolean supportsSuggestedActions(String channelId, int buttonCnt)

判斷通道是否支持數個建議動作。

參數:

channelId - 要檢查是否支持建議動作的通道。
buttonCnt - 要檢查通道的建議動作數目。

傳回:

如果通道支援 buttonCnt total Suggested Actions,則為 True,如果通道不支援該數目的建議動作,則為 False。

適用於