From c116e6cbb0b6bc39bb7172586b7163bbb231c47e Mon Sep 17 00:00:00 2001 From: ItzEmerald Date: Tue, 2 Feb 2021 17:01:58 +0000 Subject: [PATCH] SB-6.1-PRE --- commands/announce.js | 3 +++ commands/botSay.js | 2 ++ commands/help.js | 4 +++- commands/links.js | 2 ++ commands/newticket.js | 6 +++++- commands/ping.js | 4 +++- commands/suggest.js | 2 ++ events/ready.js | 3 ++- storage/SupportTickets.json | 2 +- storage/TicketID.json | 2 +- supportbot-config.yml | 4 +++- 11 files changed, 27 insertions(+), 7 deletions(-) diff --git a/commands/announce.js b/commands/announce.js index 5edf538..953e614 100755 --- a/commands/announce.js +++ b/commands/announce.js @@ -18,6 +18,8 @@ module.exports = { let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AnnounceCommand}!`); + const errornochannel = new Discord.MessageEmbed() .setTitle("Invalid Channel") .setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`) @@ -49,6 +51,7 @@ module.exports = { }).then((collected) => { announcement.push(collected.map(r => r.content)); + locateChannel.send('@everyone') const AnnouncementEmbed = new Discord.MessageEmbed() .setTitle(supportbot.AnnouncementTitle) .setThumbnail(supportbot.AnnouncementIcon) diff --git a/commands/botSay.js b/commands/botSay.js index 80fa179..9d59134 100755 --- a/commands/botSay.js +++ b/commands/botSay.js @@ -17,6 +17,8 @@ module.exports = { let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BotSay}!`); + const NoPerms = new Discord.MessageEmbed() .setTitle("Invalid Permissions!") .setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``) diff --git a/commands/help.js b/commands/help.js index d6fb2d1..c94e4d0 100644 --- a/commands/help.js +++ b/commands/help.js @@ -13,7 +13,9 @@ module.exports = { execute(message, args) { if (supportbot.DeleteMessages == "true") message.delete(); - + + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.HelpCommand}!`); + let generalCommands = ""; generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`; generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`; diff --git a/commands/links.js b/commands/links.js index 82b30f5..703214d 100755 --- a/commands/links.js +++ b/commands/links.js @@ -15,6 +15,8 @@ module.exports = { execute(message, args) { if (supportbot.DeleteMessages == "true") message.delete(); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.LinksCommand}!`); + const LinksEmbed = new Discord.MessageEmbed() .setColor(supportbot.EmbedColour) diff --git a/commands/newticket.js b/commands/newticket.js index 3be4807..522b0c2 100755 --- a/commands/newticket.js +++ b/commands/newticket.js @@ -87,6 +87,7 @@ module.exports = { } // Ticket Created, Message Sent + SupportTicket.send(`<@${message.author.id}>`) const TicketMessage = new Discord.MessageEmbed() .setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username)) .setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username)) @@ -145,6 +146,7 @@ module.exports = { .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department1 }); + SupportTicket.send(`@here`) } @@ -162,9 +164,10 @@ module.exports = { } const Department2 = new Discord.MessageEmbed() - .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`) + .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department2 }); + SupportTicket.send(`@here`) } @@ -186,6 +189,7 @@ module.exports = { .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department3 }); + SupportTicket.send(`@here`) } return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== message.author.id; } diff --git a/commands/ping.js b/commands/ping.js index f38eabb..9f3e45a 100755 --- a/commands/ping.js +++ b/commands/ping.js @@ -13,7 +13,9 @@ module.exports = { execute(message, args) { if (supportbot.DeleteMessages == "true") message.delete(); - + + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PingCommand}!`) + let ping = Date.now() - message.createdTimestamp + " ms"; const PingCommandEmbed = new Discord.MessageEmbed() diff --git a/commands/suggest.js b/commands/suggest.js index a6993d8..f512c68 100755 --- a/commands/suggest.js +++ b/commands/suggest.js @@ -16,6 +16,8 @@ module.exports = { let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.SuggestCommand}!`); + const errornochannel = new Discord.MessageEmbed() .setTitle("Invalid Channel") .setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``) diff --git a/events/ready.js b/events/ready.js index 37fbc9d..addb76b 100644 --- a/events/ready.js +++ b/events/ready.js @@ -11,7 +11,8 @@ const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8' module.exports = async (bot) => { bot.user.setActivity(supportbot.BotActivity, { - type: supportbot.ActvityType + type: supportbot.ActivityType, + url: supportbot.StreamingURL }); diff --git a/storage/SupportTickets.json b/storage/SupportTickets.json index 087e82e..728bc85 100755 --- a/storage/SupportTickets.json +++ b/storage/SupportTickets.json @@ -1,4 +1,4 @@ { - "ticket": "ticket-0005", + "ticket": "ticket-0010", "id":419821884431925260 } \ No newline at end of file diff --git a/storage/TicketID.json b/storage/TicketID.json index e10d989..d204bec 100755 --- a/storage/TicketID.json +++ b/storage/TicketID.json @@ -3,6 +3,6 @@ "id": 65 }, "805909541979029524": { - "id": 6 + "id": 11 } } \ No newline at end of file diff --git a/supportbot-config.yml b/supportbot-config.yml index 1fbb96c..81e3a59 100755 --- a/supportbot-config.yml +++ b/supportbot-config.yml @@ -16,9 +16,11 @@ Prefix: "-" Bot_Name: "SupportBot" BotActivity: "-help | SupportBot" +StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME" +# Must set ActivityType to STREAMING in order for Streaming URL to work in the bots status. ActivityType: "PLAYING" -# Activity status can either be PLAYING, WATCHING or LISTENING. +# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING. DeleteMessages: "true"