CommandsApi class
Constructors
CommandsApi (Dio _dio , Serializers _serializers )
const
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
createCommand ({required InlineObject89 inlineObject89 , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<Command > >
Create a command
Create a command for a team. ##### Permissions `manage_slash_commands` for the team the command is in.
deleteCommand ({required String commandId , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<StatusOK > >
Delete a command
Delete a command based on command id string. ##### Permissions Must have `manage_slash_commands` permission for the team the command is in.
executeCommand ({required InlineObject91 inlineObject91 , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<CommandResponse > >
Execute a command
Execute a command on a team. ##### Permissions Must have `use_slash_commands` permission for the team the command is in.
getCommandById ({required String commandId , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<Command > >
Get a command
Get a command definition based on command id string. ##### Permissions Must have `manage_slash_commands` permission for the team the command is in. Minimum server version : 5.22
listAutocompleteCommands ({required String teamId , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<BuiltList<Command > > >
List autocomplete commands
List autocomplete commands in the team. ##### Permissions `view_team` for the team.
listCommandAutocompleteSuggestions ({required String teamId , required String userInput , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<BuiltList<AutocompleteSuggestion > > >
List commands' autocomplete data
List commands' autocomplete data for the team. ##### Permissions `view_team` for the team. Minimum server version : 5.24
listCommands ({String ? teamId , bool ? customOnly = false , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<BuiltList<Command > > >
List commands for a team
List commands for a team. ##### Permissions `manage_slash_commands` if need list custom commands.
moveCommand ({required String commandId , required InlineObject90 inlineObject90 , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<StatusOK > >
Move a command
Move a command to a different team based on command id string. ##### Permissions Must have `manage_slash_commands` permission for the team the command is currently in and the destination team. Minimum server version : 5.22
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
regenCommandToken ({required String commandId , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<InlineResponse20015 > >
Generate a new token
Generate a new token for the command based on command id string. ##### Permissions Must have `manage_slash_commands` permission for the team the command is in.
toString ()
→ String
A string representation of this object.
inherited
updateCommand ({required String commandId , required Command command , CancelToken? cancelToken , Map <String , dynamic > ? headers , Map <String , dynamic > ? extra , ValidateStatus? validateStatus , ProgressCallback? onSendProgress , ProgressCallback? onReceiveProgress })
→ Future <Response<Command > >
Update a command
Update a single command based on command id string and Command struct. ##### Permissions Must have `manage_slash_commands` permission for the team the command is in.