Programming an interactive slackbot - python
Whatever you have mentioned in your question, can easily be done using slackbot. You can develop slackbot as Django server. 
If you want bot to store data, you can connect your django server to any database or to any cache (eg: Redis, Memecache).
You can write sorting logic in python and send sorted list back to slack using Slackclient library.
And based on your input to slackbot, you can perform action in python and send response back to slack.
Hope this answers!
I have recently been working on a slackbot and I have the basic functionality down, I am able to take simple commands and make have the bot answer. But, I want to know if there is anyway to have to bot store some data given by a user, such as "@slackbot 5,4,3,2,1" and then have the bot sort it and return it like "1,2,3,4,5". Also, is there anyway to have the bot read an external .csv file and have it return some type of information? for example I want the bot to tell me what the first row of a .csv file says.
Thank you! any help would be appreciated