From 4a90a2d19a4bf9a1ee82de583f82f6819905650a Mon Sep 17 00:00:00 2001 From: DJj123dj <80536295+DJj123dj@users.noreply.github.com> Date: Sun, 20 Feb 2022 09:20:26 +0100 Subject: [PATCH] v1.2.1 - added the option to remove credits - fixed the bug where ticket_system crashes the bot - in the help menu is now the correct prefix displayed --- .DS_Store | Bin 0 -> 6148 bytes README.md | 18 +++++++++++++----- commands/ticketExtra.js | 9 +++++++-- commands/ticketSystem.js | 4 ++-- config.json | 2 ++ 5 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9a1d8ab8356475869d05ad27271af385b44f8717 GIT binary patch literal 6148 zcmeHK%}T>S5S~qQs92%k#fy+95PIt|mU#Bi2Qbt~6%td_9=ymtl0JY3^)UpW#cyVo zHX*in5|tU4{WkNHoqSm`St4?iWicWe5>X$@80}#ALfFsRktkT$>G&Syd^A0;t3@Z$ z48N5Des?h)(VVX6uKE6==lrGVtLiM9mGulZSS=adC=Kke>>&uJb$b&ARtaA5n^lF<=ZB1Am?Y z^lX;?uA+^`fH7bUtQg?$Ljq+?1A0aIbYPGp05FDG1am%1a84314d@l&fjCVCYN`uI z45#U^Cm}8k=oK}coUDxdgq2-5p*UF`_C&(TrHVEh1I9p`fu3Ftx&NPRKL59q?8+E0 z2L2TTF3zUe1dkMYYv main config - `server_name` => the name from your server. - `server_logo`=> the logo from your server. - `bot_name`=> the bot's name. @@ -45,10 +48,14 @@ if there are any errors, you can open an issue on github. - `botperms_role`=> the id from a role that can run admin commands with the bot. - `prefix`=> the bot's prefix. +- `credits_please-do-not-remove` => remove the credits or not + +=> status config - `status/type` => PLAYING | STREAMING | LISTENING | WATCHING | CUSTOM | COMPETING - `status/text` => the status text -- `system/ticket_channel` => the channel where you are gonna put the !ticket msg. +=> ticket system config +- `system/ticket_channel` => the channel where you are going to put the !ticket msg. - `system/ticket_category` => the category for tickets. - `system/member_role` => this role doesn't have access to tickets (WARNING: @everyone does have access to tickets, so make sure all members have a member role!). @@ -56,7 +63,8 @@ if there are any errors, you can open an issue on github. - `system/enable_transcripts` => enable transcripts. - `system/enable_category` => enable tickets in category. -- `options/ticket.../enabled` => set this option ON or OFF. +=> ticket options config +- `options/ticket.../enabled` => set this option TRUE or FALSE. - `options/ticket.../icon` => set an emoji for this ticket option. - `options/ticket.../description` => set a description for this ticket option. - `options/ticket.../name` => set a name for this ticket option. @@ -72,6 +80,6 @@ The bot needs `ADMINISTRATOR` permissions to work the best. ## credits Please don't remove the credits from the bot 😊. -_v1.2.0_ +_v1.2.1_ -© 2021 - DJdj Development | [website](https://www.dj-dj.be) \ No newline at end of file +© 2021 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3) \ No newline at end of file diff --git a/commands/ticketExtra.js b/commands/ticketExtra.js index ad54721..ecb1d10 100644 --- a/commands/ticketExtra.js +++ b/commands/ticketExtra.js @@ -11,9 +11,14 @@ module.exports = () => { if (args[0] == config.prefix+"ticket" && (args[1] == undefined ||args[1] == "" ||args[1] == null)){ var TicketHelpMsg = new discord.MessageEmbed() .setColor(config.main_color) - .setDescription("**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n`!ticket msg` ➜ _Admin command._\n`!ticket rename` ➜ _Rename a ticket (no spaces)._\n`!ticket close` ➜ _Close a ticket._\n`!ticket add ` ➜ _Add a user to the ticket._\n`!ticket remove ` ➜ _Remove a user from the ticket._") .setTitle("Ticket commands") - .setFooter("OpenTicket by DJdj Development | view on github") + + const prefix = config.prefix + TicketHelpMsg.setDescription("**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n`"+prefix+"ticket msg` ➜ _Admin command._\n`"+prefix+"ticket rename` ➜ _Rename a ticket (no spaces)._\n`"+prefix+"ticket close` ➜ _Close a ticket._\n`"+prefix+"ticket add ` ➜ _Add a user to the ticket._\n`"+prefix+"ticket remove ` ➜ _Remove a user from the ticket._\n`"+prefix+"resetdatabase` ➜ _Steps to reset the database._") + + if (config['credits_please-do-not-remove']){ + TicketHelpMsg.setFooter("OpenTicket by DJdj Development | view on github for source code") + } msg.channel.send({embeds:[TicketHelpMsg]}) } diff --git a/commands/ticketSystem.js b/commands/ticketSystem.js index 57dcc74..d7a656b 100644 --- a/commands/ticketSystem.js +++ b/commands/ticketSystem.js @@ -52,8 +52,8 @@ module.exports = () => { var ticketName = config.options.ticket4.channel_prefix+ticketNumber } - if (config.ticket_system.enable_category){ - var Category = config.ticket_system.ticket_category + if (config.system.enable_category){ + var Category = config.system.ticket_category }else{var Category = null} interaction.guild.channels.create(ticketName,{ diff --git a/config.json b/config.json index 5cedc09..bf8ff98 100644 --- a/config.json +++ b/config.json @@ -6,6 +6,8 @@ "auth_token":"the bot's auth token", "botperms_role":"the id from a role that can do anything with the bot", "prefix":"!", + + "credits_please-do-not-remove":true, "status":{ "type":"PLAYING | STREAMING | LISTENING | WATCHING | CUSTOM | COMPETING",