Ejemplo n.º 1
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="args">Parameters.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, GetMyCommandsArgs args) => bot.GetMyCommands <BotCommand[]>(args);
Ejemplo n.º 2
0
 /// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.</summary>
 /// <param name="bot">BotClient</param>
 /// <param name="scope">A <see cref="BotCommandScope"/> object, describing scope of users. Defaults to <see cref="BotCommandScopeDefault"/>.</param>
 /// <param name="languageCode">A two-letter ISO 639-1 language code or an empty string.</param>
 /// <exception cref="BotRequestException">Thrown when a request to Telegram Bot API got an error response.</exception>
 /// <exception cref="ArgumentNullException">Thrown when a required parameter is null.</exception>
 /// <returns>Array of <see cref="BotCommand"/> on success. If commands aren't set, an empty list is returned.</returns>
 public static BotCommand[] GetMyCommands(this BotClient bot, [Optional] BotCommandScope scope, [Optional] string languageCode) => bot.GetMyCommands <BotCommand[]>(scope, languageCode);