I joined a Slack team and now I want to play with the bots there. But there seem to be lots of different ways and they all involve some server with API.
Isn't there an easy way to write a script (is that a bot) for end users? I write a file, load it into the slack app and it works?
My first idea (just to try it out) was to respond to certain keywords automatically from my own account.
There are four types of custom Slack integrations:
/<whatever>
In all of these cases, you need code running somewhere to actually do the work. (In the case of the bot, that code can run anywhere with network connectivity. In the other cases, you'll need a server that's listening on the internet for incoming HTTP/HTTPS requests.)
Slack itself never hosts/runs custom code. I'd say https://beepboophq.com/ is the closest thing to what you're looking for, since they provide hosting specifically for Slack bots.
Another option for things like slash commands is https://www.webscript.io (which I own). E.g., here's the entirety of a slash command running on Webscript that flips a coin:
return {
response_type = 'in_channel',
text = (math.random(2) == 1 and 'Heads!' or 'Tails!')
}