Skip to content

Commit

Permalink
Push! Push! Push!
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoder committed Jul 10, 2022
1 parent ce5b043 commit 8237f09
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/interactions/css.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import { reaction } from "../utils"
let validateCss = require('css-validator');

const Pusher = require("pusher");

const pusher = new Pusher({
appId: "1435548",
key: "de6cd13556d73c05beed",
secret: process.env.pusher,
cluster: "us2",
useTLS: true
});

const interactionCSS = async (bot, message) => {
const { text, channel, ts } = message
validateCss({text}, async function (_, data) {
if(data.validity){
await reaction(bot, 'add', channel, ts, 'art')
pusher.trigger("css", "new", {
message: text
});
}
});
}
Expand Down

0 comments on commit 8237f09

Please sign in to comment.