Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("slackApi")
- mon=peripheral.wrap("top")
- mon.setCursorPos(1,1)
- mon.clear()
- x,y=mon.getSize()
- mon.setCursorPos(1,y)
- last=""
- while true do
- m,u = slackApi.getLastMessage()
- if m~=last then
- name = slackApi.getUserName(u)
- if name==nil then
- name=u
- end
- mon.scroll(1)
- mon.write(name.." : "..m)
- mon.setCursorPos(1,y)
- last=m
- else
- print("Pas de message")
- end
- sleep(10)
- end
Add Comment
Please, Sign In to add comment