diff --git a/.gitignore b/.gitignore index ccb2c80..3818e26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ -package-lock.json \ No newline at end of file +package-lock.json +devConfig.json \ No newline at end of file diff --git a/commands/extracmds.js b/commands/extracmds.js index 11c59c1..68060f1 100644 --- a/commands/extracmds.js +++ b/commands/extracmds.js @@ -1,7 +1,7 @@ const discord = require('discord.js') const bot = require('../index') const client = bot.client -const config = require("../config.json") +const config = bot.config //============================= // NOT READY YET diff --git a/config.json b/config.json index baad7e3..82b13fb 100644 --- a/config.json +++ b/config.json @@ -1,9 +1,9 @@ { "bot_name":"Wumpus", "main_color":"#fffff", - "server_id":"935983011281903676", - "auth_token":"OTU4MjkwNjExMzMxNTM4OTc1.YkLLrQ.J9yfO7LgXplNahXv7xQNNvKG6fY", - "main_adminroles":["936153662668034058"], + "server_id":"server id (for slash cmds)", + "auth_token":"auth token", + "main_adminroles":["discord role id"], "prefix":"!ticket ", "logs":true, "languagefile":"english.json (currently not working)", @@ -16,16 +16,16 @@ }, "system":{ - "ticket_channel":"968899402020306994", + "ticket_channel":"channel id", "max_allowed_tickets":3, "enable_DM_Messages":true, "has@everyoneaccess":false, - "member_role":"936153574650544180", + "member_role":"member role (doesn't have access to tickets)", - "enable_transcript":true, - "enable_DM_transcript":true, - "transcript_channel":"968899606912061490" + "enable_transcript":false, + "enable_DM_transcript":false, + "transcript_channel":"channel id" }, "options":[ @@ -38,9 +38,9 @@ "type":"ticket", "color":"gray", - "adminroles":["936153350704091167"], + "adminroles":["role id"], "channelprefix":"question-", - "category":"935983011281903678", + "category":"category id", "message":"You created a ticket!", "enableDMMessage":true @@ -54,9 +54,9 @@ "type":"ticket", "color":"green", - "adminroles":["936153350704091167"], + "adminroles":["role id"], "channelprefix":"apply-", - "category":"935983011281903678", + "category":"category id", "message":"You created a ticket!", "enableDMMessage":true @@ -76,19 +76,6 @@ "options":["general","apply"], "enableTicketExplaination":true, "enableMaxTicketsWarning":true - }, - { - "id":"5", - "name":"sodfjiqdosmifj", - "description":"Youoidjfddiddjfmqoisdjf so customize all the embeds now!", - "enableFooter":true, - "footer":"Open Tiiiieakpeak", - "enableThumbnail":false, - "thumbnail":"https://www.example.com/catmemes/cat.png", - "color":"#0075e9", - "options":["apply"], - "enableTicketExplaination":true, - "enableMaxTicketsWarning":true } ] } \ No newline at end of file diff --git a/index.js b/index.js index 8512b54..ffa0265 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,17 @@ const discord = require('discord.js') -const config = require('./config.json') const intents = discord.Intents const client = new discord.Client({intents:[intents.FLAGS.GUILDS,intents.FLAGS.GUILD_MESSAGES,intents.FLAGS.GUILD_MEMBERS],partials:["CHANNEL"]}) exports.client = client client.setMaxListeners(20) +//change to FALSE on release +const isDev = true +//!!!!!!!!!!! + +if (isDev){const config = require('./devConfig.json')}else{const config = require('./config.json')} +exports.config = config + client.on('ready',async () => { const chalk = await (await import("chalk")).default if (process.argv[2] != "slash"){ diff --git a/originalConfig.json b/originalConfig.json deleted file mode 100644 index fdfeb43..0000000 --- a/originalConfig.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "bot_name":"Wumpus", - "main_color":"#fffff", - "server_id":"the server id (for slash commands)", - "auth_token":"the bot's auth token", - "main_adminroles":["the id's from admin roles"], - "prefix":"!", - "logs":true, - "languagefile":"english.json (currently not working)", - - "credits":true, - "status":{ - "enabled":true, - "type":"PLAYING | LISTENING | WATCHING | CUSTOM", - "text":"!ticket" - }, - - "system":{ - "ticket_channel":"id of the channel with the !ticket msg", - "max_allowed_tickets":5, - "enable_DM_Messages":true, - - "has@everyoneaccess":false, - "member_role":"this role doesn't have access to tickets", - - "enable_transcript":false, - "enable_DM_transcript":false, - "transcript_channel":"the channel for transcripts" - }, - - "options":[ - { - "id":"ticket1", - "name":"Test Ticket", - "description":"Create a general ticket.", - "icon":"🎫", - "label":"i'm a ticket button", - "type":"ticket", - - "color":"red|green|blue|gray|none", - "adminroles":["role id array"], - "channelprefix":"support-", - "category":"discord category id", - "message":"this is send in DM", - "enableDMMessage":true - - } - ], - - "messages":[ - { - "id":"1", - "name":"Choose Your Ticket", - "description":"You can click one of the buttons below!", - "color":"#ffffff", - "options":["ticket1","ticket2"] - } - ] -} \ No newline at end of file