irslackd
irslackd copied to clipboard
Example of available commands
Hello,
Thank you for your work. Sorry, this is not a problem, but I can't use the available commands, I don't read javascript well.
Could you give me some examples on how to use the thread command please?
An example of a command to edit or delete messages?
A small list with examples of how to use the different @slack commands.
Thanks :)
For example I can answer in a thread but not create a thread. I can't delete my messages or edit them either.
Is there a good places to add @slack examples and notes? Maybe a wiki page or in the readme?
so far I have:
@slack's available commands are enumerated in the switch at https://github.com/adsr/irslackd/blob/master/lib/irslackd.js#L803- the methods mostly forward directly to slack's api
- at least
@slack historyand@slack reactdo not work in private/direct messages (?)
history
uses https://api.slack.com/methods/conversations.history
- translates
-ltolimit - notifies slack's json response
21:18 <will> test again
21:18 <will> @slack history -l 1
21:18 -- Notice(irslackd): {"type":"message","text":"test again","user":"U04EMK30W","ts":"1663031889.716039","team":"T04EMK30U","blocks":[{"type":"rich_text","block_id":"kVx","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"test again"}]}]}]}
react
forwards to https://api.slack.com/methods/reactions.add and needs timestamp and name.
timestamp(10.6 digit) can be fetched from@slack history-- but someone must have a more ergonomic method.nameis the emoji name (sans surrounding:)
21:19 <will> @slack react 1663031889.716039 thumbsup
21:19 * will reacts @ will :+1:
thread
https://api.slack.com/methods/conversations.replies
@slack thread seems to be for thread history, not for starting/responding to a thread (?)
A wiki page would be great.