Add rfa.js

This commit is contained in:
rhearmas 2020-08-15 07:45:54 -04:00
parent b764bc7667
commit 2434b76b31
1 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,113 @@
const Discord = require("discord.js");
exports.run = async (client, message, args) => {
message.delete();
const output = await message.channel.send("Generating the landing. Reading arguments...");
guild = message.guild;
let chnl = guild.channels.find(c => c.name === 'landing');
if(args[0]) {
chnl = args[0].substring("<#".length);
chnl = chnl.substring(chnl.length-1,0);
chnl = guild.channels.find(c => c.id === chnl);
output.edit(`Landing channel set to <#${chnl}>.`);
} else {
output.edit(`Arguments provided are invalid or channel was not found; set landing channel to ${chnl}.`);
}
async function clearLanding() {
let fetched;
fetched = await chnl.fetchMessages();
await output.edit(`Clearing messages in ${chnl}.`);
if(fetched) {
chnl.bulkDelete(fetched);
await output.edit(`Messages cleared in ${chnl}.`);
} else {
await output.edit(`No messages found in ${chnl}.`);
}
}
clearLanding();
const intro = new Discord.RichEmbed()
.setTitle("Introduction")
.setColor(0x2f3136)
.setDescription(`Whether you're nominating yourself or somebody else, or simply reading what people say here, we welcome you warmly to the Requests for Adminship category. This category allows eligible users to nominate themselves for a staff position, [similar to how Wikipedia handles their admins](https://en.wikipedia.org/wiki/Wikipedia:Requests_for_adminship).`)
.addField("General standards", "On a normal basis, users who are of at least level 25 or above -- also known as being \"confirmed\" (users with the \`confirmed\` role are also allowed to apply but walk on eggshells), are at least 15 years of age and are using an account they've had for at least 6 months. The user being nominated must meet _all_ of these requirements, regardless of whether the nomination is from themselves or another user.")
.addField("_ _","Without many positive contributions to the community, however, it is very unlikely that one may pass. People will look for a variety of factors in a candidate, and the discussion can be intense.");
const process = new Discord.RichEmbed()
.setTitle("Request for Admin Procedure")
.setColor(0x2f3136)
.addField("Publish.","A user can request to receive admin by simply posting their submission in the designated channel.")
.addField("Discuss.","An ELITE will review the basic information, and then will make a channel specifically for the request, followed by a mention to the subject of the channel. All opinions and additional questions are asked in this channel, alongside discussion of what the user can and can't do.\nA pinned message will be placed to allow for voting on the user with reactions; a thumbs up (`:thumbsup:`) for yes, a thumbs down (`:thumbsdown:`) for no, or a question mark (`:grey_question:`) for neutral.")
.addField("Ask.","The user may have answered the base 3 questions, but they must also answer all questions by **quoting the original message, and keep the mention intact when the candidate responds to the query.** Elites will be requested to pin all answered questions to the channel for easy access. These questions can include \"what would you do in situation X?\" or \"what can you not do with discord that may hinder you?\". Keep the questions mature and civil; immaturity will result in mutes, kicks or bans.")
.addField("Decide.","Once you think you've learned enough, head to the pinned messages and jump to the decision message. React to **__ONE__** reaction on the message; multiple will make the reviewer assume you are unsure. You can change your votes at any time; be sure to keep it at one reaction only.")
.addField("Closure.","After around one week of the RfA being open, the Elites will close the request and tally the votes:\n - Users with at least 75% support will always pass\n - Users with support varying from 65% to 75% will be left with the Elites deciding\n - Users with **at most** 65% will most likely be declined\n\nIf your nomination fails, then please wait for a reasonable period of time before renominating yourself or accepting another nomination. Some candidates have tried again and succeeded within three months, but many people prefer to wait considerably longer before reapplying.");
const nomination = new Discord.RichEmbed()
.setTitle("Nomating users or yourself")
.setColor(0x2f3136)
.addField("Before you start,","If you're nominating someone else, make sure they're okay with it __before__ you make your nomination. If you're going with self-nomination, __WAIT__. Be sure you read up on the common advice for candidates before proceeding.")
.addField("","");
const questions = new Discord.RichEmbed()
.setTitle("Candidate Questions")
.setColor(0x2f3136)
.setDescription("Please copy this field below and answer everything accordingly in Pastebin. Then, send the link here.")
.addField("Thank you for offering to serve as a Wizard's Den staff member. Please answer these questions thorougly to help guide the readers:","1.) What administrative work do you plan to participate in?\n2.) What are your best contributions to the community?\n3.) Have any other users caused with stress, or has there been any conflict involving other users? How have you dealt with it so far and how will you deal with it in the future?\n4.) Have you held any other staff positions? If so, what roles did you have, and in what communities? Are you still in that position now, or are you in a higher one?\n5.) Have you been banned from any other Discord servers before? If so, from where, and why?");
const nullify = new Discord.RichEmbed()
.setTitle("Rule Nullification System")
.setColor(0x2f3136)
.setDescription("This is a system about how to actually be punished for breaking rules, and how to avoid it if what you want to do is somehow \"important\". This is **especially important** for staff members.")
.addField("The System","When a user breaks a rule, as long as everybody within the constituting area is okay with that rule being broken, then **most** rules *(Embed keyword, most)* broken are nullified until a complaining or reporting individual, or group of individuals, is present.")
.addField("HOWEVER...","This does NOT mean that you can break the rules first and ask questions later. Use this additional information at your own discretion, but if you misuse it or abuse it, the punishment is your own fault.\n_ _\nThere are also a few exceptions to this system. Those exceptions are as follows:\n• Abide by [Discord's ToS](https://discordapp.com/terms) and [Community Guidelines](https://discordapp.com/terms)\n• No discrimination\n• No NSFW outside of designated channels\n_ _\n**__Staff members still hold the right to punish you, even if nobody complains about something!__**\nBe wary of what you do, as all actions have consequences.")
const confirmation = new Discord.RichEmbed()
.setTitle("User confirmation and autoconfirmation")
.setColor(0x2f3136)
.addField("Overview","User confirmation allows for full functionality in the majority of channels.")
.addField("What's so special about being a confirmed user?","Being a confirmed user shows that you're special. You get special permissions in text channels. These permissions include:\n• Image posting in regular channels\n• Adding reactions to messages\n• Ability to use external emotes\n• Unlocked access to posting in self-advertisement channels")
.addField("How to be confirmed?","There are two methods to being a confirmed user:\n• Manual confirmation by receiving the **confirmed** role\n• Achieving level **25**")
.addField("Method 1: Manual confirmation","Manually confirmed users are able to 100% bypass the autoconfirmation process, and immediately receive the abilities a confirmed user has. The **board of commissioners** have the ability to grant any user the `confirmed` role.")
.addField("Method 2: Autoconfirmation","Being autoconfirmed means that you're active enough to receive special permissions. This role is called `mayhaps`.\nYou will be granted this role __automatically__ once you reach level **25**.")
const links = new Discord.RichEmbed()
.setTitle("Important Links")
.setColor(0x2f3136)
.addField("Discord Server Invite Link","Use [this invite](https://discord.gg/4zJ8xqV) to invite others.")
.addField("Member Survey","After being here for a while, feel free to fill out [this form](https://goo.gl/forms/Gwa62lcu4zC7B8992).")
.addField("Carrd","Rhearmas has an official website that shows a lot of the stuff about her. [Click here](https://rhearmas.carrd.co) to take a look!");
async function sendLandingEmbeds() {
await output.edit("Sending intro... *(Embed 1/7)*");
await chnl.send({embed: intro});
await output.edit("Sending text rules... *(Embed 2/7)*");
await chnl.send({embed: process});
await output.edit("Sending voice rules... *(Embed 3/7)*");
await chnl.send({embed: nomination});
await output.edit("Sending punishment system... *(Embed 4/7)*");
await chnl.send({embed: questions});
await output.edit("Sending punishment nullification system... *(Embed 5/7)*");
await chnl.send({embed: nullify});
await output.edit("Sending confirmation system... *(Embed 6/7)*");
await chnl.send({embed: confirmation});
await output.edit("Sending punishment nullification system... *(Embed 7/7)*");
await chnl.send({embed: links});
await chnl.send("*If you can't copy the invite link, here's the raw URL: https://discord.gg/4zJ8xqV*");
await output.edit(`Landing has finished building in ${chnl}. This message will be removed in 5 seconds.`).then(output => {
output.delete(5000)
})
.catch(() => { });
}
sendLandingEmbeds();
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "Bot Owner"
};
exports.help = {
name: "rfa",
category: "Channel Building",
description: "Builds the Requests for Adminship channel by purging the whole channel and sending embeds. Builds in first channel named **rfa-info** if no arguments are provided.",
usage: "rfa channel"
};