guildMemberRemove added
This commit is contained in:
1 parent
ecd17a51df
commit
ff7ed49905
7 files changed
+67
-9
No files matched your search
+8
-1
@@ -12,7 +12,14 @@ module.exports = {
|
||||
name: "bob",
|
||||
|
||||
execute(message, args) {
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
|
||||
|
||||
message.channel.delete()
|
||||
if (supportbot.Close === "staff") {
|
||||
member.roles.cache.has(``)
|
||||
}
|
||||
|
||||
if (supportbot.Close === "user") {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -23,11 +23,11 @@ module.exports = async (bot, member) => {
|
||||
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if (supportbot.WelcomeMessage_Icon === "BOT") {
|
||||
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
|
||||
}
|
||||
|
||||
if (supportbot.WelcomeMessage_Icon === "USER") {
|
||||
if (supportbot.SystemMessage_Icon === "USER") {
|
||||
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
// SupportBot 6.0, Created by Emerald Services
|
||||
// Ready Event
|
||||
|
||||
const Discord = require("discord.js");
|
||||
const fs = require("fs");
|
||||
|
||||
const yaml = require('js-yaml');
|
||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||
|
||||
module.exports = async (bot, member) => {
|
||||
|
||||
if (supportbot.SystemMessages === "true") {
|
||||
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
||||
|
||||
if (!SystemChannel) return;
|
||||
|
||||
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has left ${member.guild.name}!`)
|
||||
|
||||
if (supportbot.SystemMessage_Type === "embed") {
|
||||
const GuildRemoveMember = new Discord.MessageEmbed()
|
||||
.setTitle(supportbot.Leave_Title)
|
||||
.setDescription(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||
.setColor(supportbot.EmbedColour)
|
||||
|
||||
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
|
||||
}
|
||||
|
||||
if (supportbot.SystemMessage_Icon === "USER") {
|
||||
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||
}
|
||||
|
||||
|
||||
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
||||
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
||||
}
|
||||
|
||||
SystemChannel.send({ embed: GuildRemoveMember });
|
||||
|
||||
}
|
||||
|
||||
if (supportbot.SystemMessage_Type === "normal") {
|
||||
SystemChannel.send(supportbot.LeaveMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
Generated
+3
-1
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"requires": true,
|
||||
"name": "supportbot",
|
||||
"version": "6.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@discordjs/collection": {
|
||||
"version": "0.1.5",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"ticket": "ticket-0050",
|
||||
"id":419821884431925260
|
||||
"ticket": "ticket-0054",
|
||||
"id":276497792526974996
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"716992597377286145": {
|
||||
"id": 51
|
||||
"id": 55
|
||||
}
|
||||
}
|
||||
@@ -83,11 +83,12 @@ SystemMessages: "true"
|
||||
SystemMessage_Channel: "system-messages"
|
||||
SystemMessage_Type: "embed"
|
||||
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||
SystemMessage_Icon: "USER"
|
||||
|
||||
Welcome_Title: "Welcome"
|
||||
Welcome_Title: "User Joined!"
|
||||
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||
WelcomeMessage_Icon: "USER"
|
||||
|
||||
Leave_Title: "User Left!"
|
||||
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||
|
||||
SystemMessage_EmbedFooter: "false"
|
||||
|
||||
Reference in new issue
Block a user