diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..9a1d8ab Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 9978bf0..71e720e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This is an open-source discord ticket bot, you can configure it and it comes wit - has tickets for questions, partners & job applications - uses discord.js 13 - configure your own ticket options +- remove credits if you want + ## installation You need `node.js 16` to run this project, if you don't want to install `node.js 16` then there is a npm package that can help you. @@ -34,9 +36,10 @@ _npm install node@16_ ## running you can run `node index.js` but i would recommend you to use `npm start` -if there are any errors, you can open an issue on github. +if there are any errors, you can open an **issue on github** or **contact me in the discord server**. ### config (required) +=> 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",