@b1kt0p/slack-bot
Version:
Slack bot helper
24 lines (18 loc) • 354 B
JavaScript
import moment from 'moment';
export default class Interaction {
constructor(bot, data) {
this.data = data;
}
get user() {
return this.data.user.id;
}
get channel() {
return this.data.channel.id;
}
get event_ts() {
return this.data.message_ts;
}
get timestamp() {
return moment.unix(+this.data.action_ts);
}
}