Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("dotenv").config();
- const { Client, IntentsBitField, EmbedBuilder } = require("discord.js");
- const client = new Client({
- intents: [
- IntentsBitField.Flags.Guilds,
- IntentsBitField.Flags.GuildMembers,
- IntentsBitField.Flags.GuildMessages,
- IntentsBitField.Flags.MessageContent,
- ],
- });
- client.prefix = "-";
- client.allowedRoleID = "1254240699981893822";
- client.allowedRoleIDMember = "1254241162332737587";
- client.on("ready", (c) => {
- console.log(`${c.user.username} is online.`);
- });
- client.on("messageCreate", async (message) => {
- if (message.author.bot) return;
- if (!message.content.startsWith(client.prefix)) return;
- const args = message.content.substring(1).split(" ");
- const cmd = args.shift().toLowerCase();
- const embed = new EmbedBuilder();
- const sendOption = { embeds: [], content: "" };
- if (message.member.roles.cache.has(client.allowedRoleID)) {
- const user =
- message.mentions.members.first()?.user ??
- client.users.cache.get(args[0]) ??
- (await client.users.fetch(args[0]).catch(() => {}));
- if (cmd === "r1") {
- sendOption.embeds.push(
- embed
- .setTitle("``R1`` Respect")
- .setDescription(
- "> You must show respect to others, discrimination and hate speech is strictly prohibited."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r2") {
- sendOption.embeds.push(
- embed
- .setTitle("``R2`` Drama")
- .setDescription(
- "> Do not cause drama within our community, unnecessary drama will be moderated for those who are included in the situation."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r3") {
- sendOption.embeds.push(
- embed
- .setTitle("``R3`` Nicknames")
- .setDescription(
- "> Your discord nickname must be matching your Roblox username, nothing else other than callsigns and it must include your username along with it."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r4") {
- sendOption.embeds.push(
- embed
- .setTitle("``R4`` Advertisement")
- .setDescription(
- "> Prevent from promoting any of your social media pages or anything directed toward you on social media, promoting discord servers is strictly prohibited."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r5") {
- sendOption.embeds.push(
- embed
- .setTitle("``R5`` Adult Content")
- .setDescription(
- "> We strictly prohibit any gore, nudity or pornographic images, sending them will result in harsh punishment and this is unappealable action."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r6") {
- sendOption.embeds.push(
- embed
- .setTitle("``R6`` Flooding")
- .setDescription(
- "> You must keep your messaging under a certain limit to ensure you are not flooding our server, you must keep all text under 6 sentences, or you will be punished for flooding, prevent from spamming as you do not gain extra experience from chatting more frequently."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r7") {
- sendOption.embeds.push(
- embed
- .setTitle("``R7`` English Server")
- .setDescription(
- "> All of your conversations must be under the English language, we are an English only server and any conversations out of English will be moderated."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r8") {
- sendOption.embeds.push(
- embed
- .setTitle("``R8`` Alternative Accounts")
- .setDescription(
- "> We restrict you to only having 1 account within our server, any more is prohibited. If your discord account was terminated, please make a support ticket informing us."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- } else if (cmd === "r9") {
- sendOption.embeds.push(
- embed
- .setTitle("``R9`` Common Sense")
- .setDescription(
- "> Although we may not have some rules listed here, we will punish those who do not use their common sense and abide by possible rules. If you feel the rule would be restricted refrain from doing it."
- )
- .setColor("#c40d2c")
- .setImage(
- "https://media.discordapp.net/attachments/1254255009084866622/1255130371083735050/banner.jpg?ex=667c02bf&is=667ab13f&hm=3e6a5d8eb398d03824897983b16424363a6b654c1dcf1771907b8fa2d6a06084&=&format=webp"
- )
- );
- sendOption.content = user ? user.toString() : null;
- }
- message.channel.send({ embeds: [sendOption]})
- message.delete();
- }
- });
- client.on("messageCreate", async (message) => {
- if (message.author.bot) return;
- if (!message.content.startsWith(client.prefix)) return;
- const args = message.content.substring(1).split(" ");
- const cmd = args.shift().toLowerCase();
- const embed = new EmbedBuilder();
- const sendOption = { embeds: [], content: "" };
- if (message.member.roles.cache.has(client.allowedRoleIDMember)) {
- if (cmd === "app") {
- sendOption.embeds.push(
- embed
- .setDescription("<:Albuquerque:1254279653175070811> [**Staff Application**](https://melonly.xyz/forms/7210522343515361280)")
- .setColor("#c40d2c")
- );
- } else if (cmd === "group") {
- sendOption.embeds.push(
- embed
- .setDescription("<:people_w:1254292907435753535> [**Group**](https://www.roblox.com/groups/17240768/Albuquerque-Roleplay)")
- .setColor("#c40d2c")
- );
- }
- message.channel.send({ embeds: [sendOption]})
- message.delete();
- }
- });
- client.on("guildMemberAdd", async (member) => {
- const channelID = "1254242667630428170"; // Replace with the ID of your desired channel
- const welcomeMessage = `🎈${member} Welcome to **Albuquerque Roleplay**!\nWe now have ``${memberCount}`` members.`; // Customize your welcome message here
- const channel = member.guild.channels.cache.get(channelID);
- if (!channel) return;
- channel.send({ content: welcomeMessage }).catch(console.error);
- });
- client.login(process.env.TOKEN);
Advertisement
Add Comment
Please, Sign In to add comment