Created
February 22, 2020 21:49
-
-
Save Catbuttes/8036a379ae2f23e7e6e43a0b82a76bee to your computer and use it in GitHub Desktop.
A google apps script file to output the RE server rules to a channel
This file contains hidden or 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
var POST_URL = "ENTER WEBHOOK URL HERE"; | |
var INVITE_URL = "ENTER INVITE LINK HERE"; | |
var REACTIONS_CHANNEL = "<#" + "ENTER REACTIONS CHANNEL ID HERE" + ">" | |
var DISCORD_SERVER_NAME = "Real Engineering Discord" | |
var HIGHLIGHT_COLOUR = 0x0432ff | |
function myFunction() { | |
var primaryRules = { | |
"method": "post", | |
"headers": { | |
"Content-Type": "application/json", | |
}, | |
"payload": JSON.stringify({ | |
"embeds": [{ | |
"title": DISCORD_SERVER_NAME + " Rules and Requests", | |
"description": "_Primary Rules..._", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__1. Be respectful__", | |
"description": "Our primary 'rule' is a simple one, we ask users to be respectful to others. \n\n\ | |
Be nice and civil, even when you disagree with someone or something. We will not tolerate hate or bigotry of any kind.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__2. Work towards a solution__", | |
"description": "It’s okay to vent frustration, but afterwards, do try and look for and work towards solutions.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__3. The moderators are here to help, so let them help__", | |
"description": "If you think any content or a user is in breach of these rules, please contact a moderator. \n\n\ | |
Specifically, the moderators act on everybody’s behalf and are here to help users. If any user (moderators included) makes you feel uncomfortable, please let them know so we can work towards providing a solution.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__4. Please don't pretend to be a member of staff__", | |
"description": "Don't assume the role of a moderator or any position of authority. This includes both your behaviour and/or changing your username/nickname.", | |
"color": HIGHLIGHT_COLOUR | |
}] | |
}) | |
}; | |
var secondaryRules = { | |
"method": "post", | |
"headers": { | |
"Content-Type": "application/json", | |
}, | |
"payload": JSON.stringify({ | |
"embeds": [{ | |
"title": "Secondary rules", | |
"description" : "This Discord server sees users of all ages, please act accordingly. \n\n\ | |
Most of the following rules have been created because someone went \"But there's no rule about it\", so feel free to be yourself but keep these rules in mind when interacting with others.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__5. Avoid objectionable content__", | |
"description": "Please refrain from bringing up objectionable content. Objectionable content is defined as but not limited to: (sexually) suggestive or explicit content, sexual objectivication, excessive use of swearing, slurs, gore, murder/suicide, deprecation of mental health, disorders, or conditions (including ASD (Autism) and depression), genocide, and/or personal or generalised attacks, racism or hate speech.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__6. Use channels/rooms appropriately__", | |
"description": "Please try and start a conversation in an appropriate channel. It's perfectly okay if a conversation evolves outside of its starting scope, but do try and keep an eye on a channel's intended use. If other users want to discuss something within a specific channel, please move when they ask you to. A moderator may also ask you to move if they feel it's becoming disruptive to the channel's intended use.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__7. No religious or political discussions__", | |
"description": "Avoid religious and political topics and statements/discussions. Talking about world events is fine, using it to promote/defend your personal preference is not. We’re not banning it altogether, but we have to keep a tight leash on such topics because it can very easily divide a community.\n\n\ | |
This is not the place to go looking for theological and / or bureaucratic debates.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__8. Refrain from linking to paid services and please don’t spam__", | |
"description": "Linking to useful websites and other resources is, naturally, fine if it’s within the spirit of the discussion. However, please do not advertise other servers, paid content websites, or subscription services without prior permission from a moderator.\n\n\ | |
When linking to external servers, please ensure that they conform to our Discord rules before contacting a moderator. Please do not spam anything and kindly inform moderators if any links violate our rules.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__9. This is a substance abuse free Discord__", | |
"description": "Please do not use text and voice channels if you are drunk or otherwise affected by substances.\n\n\ | |
Being mildly intoxicated is fine. If you’re slurring your words and / or bothering users, you'll get a time-out.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__10. Use commands sparingly__", | |
"description": "Please avoid excessive use of the @ command (pinging) and / or bot commands. In addition, please do not ping moderators unless there’s an urgent reason for it. ", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__11. No spoilers please__", | |
"description": "We all know Luke Skywalker was greeted with “Live long and prosper” when he arrived on the other side of the Stargate for the first time, but for new content, please avoid discussing spoilers for at least a week. This includes Youtube videos, streams, movies and TV shows, and other popular content.", | |
"color": HIGHLIGHT_COLOUR | |
}, | |
{ | |
"title": "__12. Privacy and chat logs__", | |
"description": "This server has a bot log certain actions in a different channel for moderation purposes only.\n\n\ | |
Our logs include: message deletions and member join/leave. We do not store data outside of discord. We do not actively share message contents or information, unless required by Discord TOS.", | |
"color": HIGHLIGHT_COLOUR | |
}] | |
}) | |
}; | |
var invite = { | |
"method": "post", | |
"headers": { | |
"Content-Type": "application/json", | |
}, | |
"payload": JSON.stringify({ | |
"content": "You can invite your friends using this link! " + INVITE_URL | |
}) | |
}; | |
var reactionFlairs = { | |
"method": "post", | |
"headers": { | |
"Content-Type": "application/json", | |
}, | |
"payload": JSON.stringify({ | |
"content": "Be sure to check out "+REACTIONS_CHANNEL+" for vanity flairs and to receive pings for Real Engineering and Real Science content!" | |
}) | |
}; | |
UrlFetchApp.fetch(POST_URL, primaryRules); | |
UrlFetchApp.fetch(POST_URL, secondaryRules); | |
UrlFetchApp.fetch(POST_URL, invite); | |
UrlFetchApp.fetch(POST_URL, reactionFlairs); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment