Class SetMyCommands


public class SetMyCommands extends AbstractBaseRequest<SetMyCommands, Boolean>
SetMyCommands class. Returns True on success.
Since:
3 March 2025
See Also:
  • Constructor Details

    • SetMyCommands

      public SetMyCommands(BotCommand[] commands, Api api)
      Required
      Parameters:
      commands - commands
      api - api
  • Method Details

    • scope

      public SetMyCommands scope(BotCommandScope bot_command_scope)
      Optional
      Parameters:
      bot_command_scope - A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault
      Returns:
      SetMyCommands
    • languageCode

      public SetMyCommands languageCode(String language_code)
      Optional
      Parameters:
      language_code - A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
      Returns:
      SetMyCommands