Compare commits

..
2 Commits
Author SHA1 Message Date
DJj123dj 8981c9e60e v1.2.2
some bugs fixed!
2022-03-04 10:20:47 +01:00
DJj123dj 4a90a2d19a 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
2022-02-20 09:20:26 +01:00
7 changed files with 29 additions and 14 deletions
Vendored
BIN
View File
Binary file not shown.
+13 -5
View File
@@ -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.2_
© 2021 - DJdj Development | [website](https://www.dj-dj.be)
© 2021 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3)
+1 -1
View File
@@ -5,7 +5,7 @@ const config = require("../config.json")
module.exports = () => {
client.on("message",(msg) => {
client.on("messageCreate",(msg) => {
var args = msg.content.split(" ")
if (args[0] == config.prefix+"resetdatabase"){
if (msg.author.id == client.application.owner.id){
+4 -4
View File
@@ -56,13 +56,13 @@ module.exports = () => {
}
var categorylist = ""
if (config.options.ticket1.enabled){categorylist = "\n\n"+categorylist+config.options.ticket1.icon+": **"+config.options.ticket1.name+"**\n"+config.options.ticket1.description}
if (config.options.ticket1.enabled){categorylist = categorylist+"\n"+config.options.ticket1.icon+": **"+config.options.ticket1.name+"**\n"+config.options.ticket1.description}
if (config.options.ticket2.enabled){categorylist = "\n\n"+categorylist+config.options.ticket2.icon+": **"+config.options.ticket2.name+"**\n"+config.options.ticket2.description}
if (config.options.ticket2.enabled){categorylist = categorylist+"\n\n"+config.options.ticket2.icon+": **"+config.options.ticket2.name+"**\n"+config.options.ticket2.description}
if (config.options.ticket3.enabled){categorylist = "\n\n"+categorylist+config.options.ticket3.icon+": **"+config.options.ticket3.name+"**\n"+config.options.ticket3.description}
if (config.options.ticket3.enabled){categorylist = categorylist+"\n\n"+config.options.ticket3.icon+": **"+config.options.ticket3.name+"**\n"+config.options.ticket3.description}
if (config.options.ticket4.enabled){categorylist = "\n\n"+categorylist+config.options.ticket4.icon+": **"+config.options.ticket4.name+"**\n"+config.options.ticket4.description}
if (config.options.ticket4.enabled){categorylist = categorylist+"\n\n"+config.options.ticket4.icon+": **"+config.options.ticket4.name+"**\n"+config.options.ticket4.description}
+7 -2
View File
@@ -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 <user>` ➜ _Add a user to the ticket._\n`!ticket remove <user>` ➜ _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 <user>` ➜ _Add a user to the ticket._\n`"+prefix+"ticket remove <user>` ➜ _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]})
}
+2 -2
View File
@@ -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,{
+2
View File
@@ -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",