/hotbar [subcommand]

>>Subcommands
action “action name” [#1] [#2]
Set the specified action to slot [#2] in hotbar [#1]. If [#2] is omitted, the action will be set to the lowest-numbered slot available. If both [#1] and [#2] are omitted, the action will be set to the lowest-numbered slot available on the lowest-numbered hotbar available. This applies to all of the following subcommands.
general “general action name” [#1] [#2]
Set the specified general action to slot [#2] in hotbar [#1].

straight out of the game