Skip to content
This repository was archived by the owner on May 12, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions scripts/conduct.coffee

This file was deleted.

34 changes: 34 additions & 0 deletions scripts/conduct.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Description:
// Remind members about our code of conduct
//
// Dependencies:
// None
//
// Configuration:
// None
//
// Commands:
// bot conduct - Remind the current channel about the devICT code of conduct
// bot conduct #hubot - Remind the #hubot channel about the devICT code of conduct (omit "bot" and this can be in a DM to bot)

module.exports = (robot) => {
robot.respond(/(?:code(?: of)? )?conduct(?:\s?(#[\w-]+))?/i, (msg) => {
let msgs = [
"devICT is dedicated to a safe and harassment-free experience for " +
"everyone. We do not tolerate harassment in any form. If you have any " +
"questions or concerns please feel free to reach out to one of the devICT " +
"organizers. Our anti-harassment policy can be found at: " +
"https://devict.org/conduct",
"Generally let's keep things PG."
]
if (typeof msg.match[1] !== 'undefined') { // a channel was specified
for (let i = 0; i < msgs.length; i++) {
robot.messageRoom(msg.match[1], msgs[i])
}
} else {
for (let i = 0; i < msgs.length; i++) {
msg.send(msgs[i])
}
}
})
}