7.5 commit
This commit is contained in:
1 parent
4eb8658459
commit
45bd88e4d2
6 files changed
+88
-9
No files matched your search
+7
-1
@@ -168,7 +168,10 @@ module.exports = new Command({
|
||||
.catch(async (err) => {
|
||||
console.error(err);
|
||||
});
|
||||
await tUser
|
||||
|
||||
if (supportbot.DMTranscripts) {
|
||||
|
||||
await tUser
|
||||
?.send({ embeds: [transcriptEmbed], files: [file] })
|
||||
.catch(async (err) => {
|
||||
console.error(err);
|
||||
@@ -180,6 +183,9 @@ module.exports = new Command({
|
||||
?.send({ embeds: [transcriptEmbed], files: [file] });
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await interaction.channel.delete().catch(async (error) => {
|
||||
console.error(error);
|
||||
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
|
||||
|
||||
+45
-1
@@ -29,6 +29,41 @@ module.exports = new Command({
|
||||
type: "STRING",
|
||||
required: true,
|
||||
},
|
||||
|
||||
{
|
||||
name: "color",
|
||||
description: "Embed HEX Color",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "fieldtitle",
|
||||
description: "Add an additional Embed Field",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "fieldcontent",
|
||||
description: "Add an additional Embed Field",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "thumbnail",
|
||||
description: "Embed Thumbnail URL",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "image",
|
||||
description: "Embed Image URL",
|
||||
type: "STRING",
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
permissions: ["SEND_MESSAGES"],
|
||||
|
||||
@@ -54,10 +89,19 @@ module.exports = new Command({
|
||||
) {
|
||||
const EmbedTitle = interaction.options.getString("title");
|
||||
const EmbedSubject = interaction.options.getString("message");
|
||||
const EmbedColour = interaction.options.getString("color");
|
||||
const EmbedThumbnail = interaction.options.getString("thumbnail");
|
||||
const EmbedImage = interaction.options.getString("image");
|
||||
const EmbedFieldContent = interaction.options.getString("fieldcontent");
|
||||
const EmbedFieldTitle = interaction.options.getString("fieldtitle");
|
||||
|
||||
const EmbedMsg = new Discord.MessageEmbed()
|
||||
.setTitle(EmbedTitle)
|
||||
.setDescription(EmbedSubject);
|
||||
.setDescription(EmbedSubject)
|
||||
.addField(EmbedFieldTitle, EmbedFieldContent)
|
||||
.setColor(EmbedColour)
|
||||
.setThumbnail(EmbedThumbnail)
|
||||
.setImage(EmbedImage);
|
||||
|
||||
interaction.reply({
|
||||
embeds: [EmbedMsg],
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# Discord Support: https://emeraldsrv.dev/discord
|
||||
# Community Resources: https://emeraldsrv.dev/resources
|
||||
|
||||
SupportBot_Version: "7.4.2"
|
||||
SupportBot_Version: "7.5"
|
||||
|
||||
# -------------------------
|
||||
# General Configuration
|
||||
@@ -85,7 +85,7 @@ SuggestionDownvote: "❌"
|
||||
TicketCategory: "Tickets" # Only for tickets without a category
|
||||
TicketPrefix: "ticket-" # The prefix for ticket channel names
|
||||
|
||||
TicketLog: "logs"
|
||||
TicketLog: "ticket-logs"
|
||||
TranscriptLog: "transcripts"
|
||||
|
||||
DMTranscripts: true
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
{
|
||||
"id": 0,
|
||||
"TicketPanelID": ""
|
||||
}
|
||||
{"id":0,"TicketPanelID":"947337678720999458"}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
const Discord = require('discord.js');
|
||||
const fs = require("fs");
|
||||
const Event = require("../Structures/Event.js");
|
||||
const yaml = require("js-yaml");
|
||||
const supportbot = yaml.load(
|
||||
fs.readFileSync("./Configs/supportbot.yml", "utf8")
|
||||
);
|
||||
|
||||
module.exports = new Event("guildMemberAdd", async (client, member, interaction, guild) => {
|
||||
|
||||
const WelcomeChannel = interaction.guild.channels.get(supportbot.WelcomeChannel)
|
||||
|
||||
const WelcomeEmbed = new Discord.MessageEmbed()
|
||||
.setColor(supportbot.WelcomeColour)
|
||||
.setTitle(supportbot.WelcomeTitle)
|
||||
.setDescription(supportbot.WelcomeMessage.replace(/%joined_user%/g, member.user))
|
||||
.setThumbnail(member.user.displayAvatarURL())
|
||||
.setTimestamp();
|
||||
|
||||
member.guild.channels.cache.get(
|
||||
supportbot.WelcomeChannel).send({
|
||||
embeds: [WelcomeEmbed]
|
||||
|
||||
})
|
||||
|
||||
|
||||
const WelcomeMsg = await WelcomeChannel.send({
|
||||
embeds: [WelcomeEmbed]
|
||||
});
|
||||
|
||||
});
|
||||
+1
-1
@@ -14,7 +14,7 @@ const panelconfig = yaml.load(
|
||||
|
||||
const Event = require("../Structures/Event.js");
|
||||
|
||||
module.exports = new Event("ready", async (client) => {
|
||||
module.exports = new Event("ready", async (client, interaction) => {
|
||||
const { getRole, getChannel, getCategory } = client;
|
||||
client.user.setActivity(supportbot.BotActivity, {
|
||||
type: supportbot.ActivityType,
|
||||
|
||||
Reference in new issue
Block a user