Execute slash command as slack bot

Solution 1:

Bots can use the undocumented API method chat.command to invoke slash commands.

See here for an unofficial documentation page of this API method.

This question was also answered here.

Solution 2:

The command chat.command needs the permission scope post, which only legacy tokens have and which is not available for Slack apps.

I just asked the Slack customer support if sending slash commands programmatically is still possible and received the following reply:

I'm afraid not. Slash commands can only be triggered by human-sent messages from the client. Apologies.