This commit is contained in:
ItzEmerald committed 2022-06-16 22:12:14 +01:00
1 parent da7b6d487c
commit 5e38573aed
12 files changed
+760 -154

No files matched your search

Vendored
BIN
View File
Binary file not shown.
-40
View File
@@ -1,40 +0,0 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: "[BUG]"
labels: Bug
assignees: ""
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
@@ -1,19 +0,0 @@
---
name: "❓Suggest an Idea?"
about: Suggest an idea for SupportBot?
title: "[SUGGESTION]"
labels: Suggestion
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
-28
View File
@@ -1,28 +0,0 @@
# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [dev, release]
pull_request:
branches: [dev, release]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 17.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+7 -1
View File
@@ -10,7 +10,7 @@
# Discord Support: https://emeraldsrv.dev/discord
# Community Resources: https://emeraldsrv.dev/resources
SupportBot_Version: "BETA 7.6"
SupportBot_Version: "7.6"
# -------------------------
# General Configuration
@@ -68,6 +68,9 @@ TicketBlackListRole: "Blacklisted"
# Join/Leave Configuration
# ----------------------------
Welcome: true
# set to false to disable joining logs
WelcomeChannel: "join-leave-logs"
WelcomeColour: "#f74343"
WelcomeTitle: "User Joined!"
@@ -83,6 +86,9 @@ EmbedWelcomeThumbnail: "BOT"
# "BOT" will display the bot's profile picture.
# false to disable
Leave: true
# set to false to disable leaving logs
LeaveChannel: "join-leave-logs"
LeaveColour: "#f74343"
LeaveTitle: "User Left!"
+32 -28
View File
@@ -8,35 +8,39 @@ const supportbot = yaml.load(
);
module.exports = new Event("guildMemberAdd", async (client, member, interaction, guild) => {
const WelcomeChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.WelcomeChannel)
const WelcomeEmbed = new Discord.MessageEmbed()
.setColor(supportbot.WelcomeColour)
.setTitle(supportbot.WelcomeTitle)
.setDescription(supportbot.WelcomeMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.Welcome) {
const WelcomeChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.WelcomeChannel)
const WelcomeEmbed = new Discord.MessageEmbed()
.setColor(supportbot.WelcomeColour)
.setTitle(supportbot.WelcomeTitle)
.setDescription(supportbot.WelcomeMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.EmbedWelcomeThumbnail === "BOT") {
WelcomeEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeThumbnail === "BOT") {
WelcomeEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeThumbnail === "USER") {
WelcomeEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeImage) {
WelcomeEmbed.setImage(supportbot.EmbedWelcomeImageURL)
}
WelcomeChannel.send({
embeds: [WelcomeEmbed]
})
if (supportbot.AutoRole) {
var role = member.guild.roles.cache.find(role => role.name === supportbot.JoinRole);
member.roles.add(role);
}
console.log(`\u001b[32m`, `[+]`, `\u001b[33m`, `${member.user.username} joined the server!`)
if (supportbot.EmbedWelcomeThumbnail === "USER") {
WelcomeEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedWelcomeImage) {
WelcomeEmbed.setImage(supportbot.EmbedWelcomeImageURL)
}
WelcomeChannel.send({
embeds: [WelcomeEmbed]
})
if (supportbot.AutoRole) {
var role = member.guild.roles.cache.find(role => role.name === supportbot.JoinRole);
member.roles.add(role);
}
console.log(`\u001b[32m`, `[+]`, `\u001b[33m`, `${member.user.username} joined the server!`)
}
});
+26 -23
View File
@@ -8,31 +8,34 @@ const supportbot = yaml.load(
);
module.exports = new Event("guildMemberRemove", async (client, member, interaction, guild) => {
const LeaveChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.LeaveChannel)
const LeaveEmbed = new Discord.MessageEmbed()
.setColor(supportbot.LeaveColour)
.setTitle(supportbot.LeaveTitle)
.setDescription(supportbot.LeaveMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.Leave) {
const LeaveChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.LeaveChannel)
if (supportbot.EmbedLeaveThumbnail === "BOT") {
LeaveEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveThumbnail === "USER") {
LeaveEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveImage) {
LeaveEmbed.setImage(supportbot.EmbedLeaveImageURL)
}
LeaveChannel.send({
embeds: [LeaveEmbed]
})
console.log(`\u001b[31m`, `[-]`, `\u001b[33m`, `${member.user.username} joined the server!`)
const LeaveEmbed = new Discord.MessageEmbed()
.setColor(supportbot.LeaveColour)
.setTitle(supportbot.LeaveTitle)
.setDescription(supportbot.LeaveMessage.replace(/%joined_user%/g, member.user))
.setTimestamp();
if (supportbot.EmbedLeaveThumbnail === "BOT") {
LeaveEmbed.setThumbnail(client.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveThumbnail === "USER") {
LeaveEmbed.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.EmbedLeaveImage) {
LeaveEmbed.setImage(supportbot.EmbedLeaveImageURL)
}
LeaveChannel.send({
embeds: [LeaveEmbed]
})
console.log(`\u001b[31m`, `[-]`, `\u001b[33m`, `${member.user.username} joined the server!`)
}
});
+5 -9
View File
@@ -34,7 +34,7 @@ module.exports = new Event("ready", async (client, interaction) => {
console.log(` `);
console.log(
`\u001b[33m`,
`${supportbot.Name} v${supportbot.SupportBot_Version}`,
`${supportbot.Name} | v${supportbot.SupportBot_Version}`,
`\u001b[36m`,
`Connected to Discord`
);
@@ -74,14 +74,10 @@ module.exports = new Event("ready", async (client, interaction) => {
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`);
console.log(` `);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
if (client.guilds.cache.size !== 1) {
console.log(
`\u001b[31m`,
`${client.user.username} must be in only 1 server. Please join this server, leave any others, and restart the bot.`
);
console.log(`\u001b[31m`, `${client.user.username} will now exit.`);
return process.exit(1);
}
const roles = [
supportbot.Admin,
supportbot.Staff,
+688 -5
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -22,6 +22,7 @@
"discord.js": "^13.6.0",
"js-yaml": "^4.1.0",
"moment": "^2.29.3",
"translate": "^1.4.1"
"translate": "^1.4.1",
"twitter": "^1.7.1"
}
}