push
This commit is contained in:
1 parent
bdb8389d8d
commit
f40aa9ed14
4 files changed
+52
-10
No files matched your search
@@ -9,5 +9,41 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
||||
|
||||
|
||||
module.exports = async (bot) => {
|
||||
if (supportbot.SystemMessages === "true") {
|
||||
const SystemChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||
|
||||
if (!SystemChannel) return;
|
||||
|
||||
if (supportbot.SystemMessage_Type === "embed") {
|
||||
const GuildAddMember = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Welcome_Title)
|
||||
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, message.member.user.username).replace(/%guildname%/g, guild.name))
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if (supportbot.WelcomeMessage_Icon === "BOT") {
|
||||
GuildAddMember.setThumbnail(message.author.displayAvatarURL())
|
||||
}
|
||||
|
||||
if (supportbot.WelcomeMessage_Icon === "USER") {
|
||||
GuildAddMember.setThumbnail(message.member.displayAvatarURL())
|
||||
}
|
||||
|
||||
|
||||
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
||||
}
|
||||
|
||||
SystemChannel.send({ embed: GuildAddMember });
|
||||
|
||||
}
|
||||
|
||||
if (supportbot.SystemMessage_Type === "normal") {
|
||||
SystemChannel.send(supportbot.WelcomeMessage.replace(/%member%/g, message.member.user.username).replace(/%guildname%/g, guild.name))
|
||||
|
||||
if (supportbot.AutoRole === "true") {
|
||||
member.roles.add(supportbot.AutoRole_Role)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
Generated
+3
-3
@@ -79,9 +79,9 @@
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.13.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"discord.js": "^12.2.0",
|
||||
"js-yaml": "^3.13.1"
|
||||
"js-yaml": "^3.14.0"
|
||||
}
|
||||
}
|
||||
+12
-6
@@ -29,7 +29,9 @@ WarningColour: "#fca117"
|
||||
|
||||
# Role Configuration
|
||||
|
||||
AutoRole: "Member"
|
||||
AutoRole: "true"
|
||||
# By setting "AutoRole to 'true' the bot will automatically apply the role below when members joins. Set to 'false' to disable this feature.
|
||||
AutoRole_Role: "Member"
|
||||
|
||||
Staff: "Support"
|
||||
Admin: "Admin"
|
||||
@@ -59,8 +61,6 @@ TicketDepartments: true
|
||||
AllowStaff: true
|
||||
# AllowStaff is an option to whether or not you want the users with the "Staff" role to be able to view inside tickets. If set false "Staff" will not view tickets.
|
||||
|
||||
DepartmentTiming: "1000"
|
||||
|
||||
DepartmentEmoji_1: "🙋"
|
||||
DepartmentEmoji_2: "💸"
|
||||
DepartmentEmoji_3: "📗"
|
||||
@@ -81,10 +81,15 @@ DepartmentRole_3: "Support"
|
||||
SystemMessages: "true"
|
||||
|
||||
SystemMessage_Channel: "system-messages"
|
||||
SystemMessages_Embed: "true"
|
||||
SystemMessages_Type: "normal"
|
||||
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||
|
||||
WelcomeMessage: "Hello %membertag%, Welcome to %guildname%!"
|
||||
LeaveMessage: "Goodbye %membertag%, Thank you for visting %guildname%!"
|
||||
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||
WelcomeMessage_Icon: "USER"
|
||||
|
||||
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||
|
||||
SystemMessage_EmbedFooter: "false"
|
||||
|
||||
# LINKS Configuration
|
||||
|
||||
@@ -94,6 +99,7 @@ LINKS:
|
||||
"Website": "https://www.example.com"
|
||||
"Store": "https://store.example.com"
|
||||
"Discord": "https://discord.gg/example"
|
||||
# "Twitter": "https://twitter.com/example"
|
||||
|
||||
# Suggestions Configuration
|
||||
|
||||
|
||||
Reference in new issue
Block a user