This repository has been archived by the owner on May 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Description: | ||
// Remind members about our code of conduct | ||
// | ||
// Dependencies: | ||
// None | ||
// | ||
// Configuration: | ||
// None | ||
// | ||
// Commands: | ||
// hubot conduct - Remind the channel about the devICT code of conduct | ||
|
||
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]) | ||
} | ||
} | ||
}) | ||
} |