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) => {
|
module.exports = async (bot) => {
|
||||||
|
if (supportbot.SystemMessages === "true") {
|
||||||
const SystemChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
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=="
|
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||||
},
|
},
|
||||||
"js-yaml": {
|
"js-yaml": {
|
||||||
"version": "3.13.1",
|
"version": "3.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"argparse": "^1.0.7",
|
"argparse": "^1.0.7",
|
||||||
"esprima": "^4.0.0"
|
"esprima": "^4.0.0"
|
||||||
|
|||||||
+1
-1
@@ -10,6 +10,6 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^12.2.0",
|
"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
|
# 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"
|
Staff: "Support"
|
||||||
Admin: "Admin"
|
Admin: "Admin"
|
||||||
@@ -59,8 +61,6 @@ TicketDepartments: true
|
|||||||
AllowStaff: 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.
|
# 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_1: "🙋"
|
||||||
DepartmentEmoji_2: "💸"
|
DepartmentEmoji_2: "💸"
|
||||||
DepartmentEmoji_3: "📗"
|
DepartmentEmoji_3: "📗"
|
||||||
@@ -81,10 +81,15 @@ DepartmentRole_3: "Support"
|
|||||||
SystemMessages: "true"
|
SystemMessages: "true"
|
||||||
|
|
||||||
SystemMessage_Channel: "system-messages"
|
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%!"
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
LeaveMessage: "Goodbye %membertag%, Thank you for visting %guildname%!"
|
WelcomeMessage_Icon: "USER"
|
||||||
|
|
||||||
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
|
|
||||||
|
SystemMessage_EmbedFooter: "false"
|
||||||
|
|
||||||
# LINKS Configuration
|
# LINKS Configuration
|
||||||
|
|
||||||
@@ -94,6 +99,7 @@ LINKS:
|
|||||||
"Website": "https://www.example.com"
|
"Website": "https://www.example.com"
|
||||||
"Store": "https://store.example.com"
|
"Store": "https://store.example.com"
|
||||||
"Discord": "https://discord.gg/example"
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
|
||||||
# Suggestions Configuration
|
# Suggestions Configuration
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user