last push
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"bot_name":"Wumpus",
|
|
||||||
"main_color":"#ffffff",
|
"main_color":"#ffffff",
|
||||||
"server_id":"server id (for slash cmds)",
|
"server_id":"server id (for slash cmds)",
|
||||||
"auth_token":"auth token",
|
"auth_token":"auth token",
|
||||||
|
|||||||
+6
-1
@@ -10,4 +10,9 @@ exports.utils = {
|
|||||||
|
|
||||||
//events
|
//events
|
||||||
const events = require("./modules/events").events
|
const events = require("./modules/events").events
|
||||||
exports.events = events
|
exports.events = events
|
||||||
|
|
||||||
|
//actions
|
||||||
|
const actions = require("./modules/actions").actions
|
||||||
|
//comming soon
|
||||||
|
//exports.actions = actions
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
//ACTIONS:
|
||||||
|
|
||||||
|
|
||||||
|
//EXPORT ACTIONS:
|
||||||
|
exports.actions = {
|
||||||
|
|
||||||
|
}
|
||||||
+2
-3
@@ -245,14 +245,13 @@ exports.checker = async () => {
|
|||||||
//--------------------------|
|
//--------------------------|
|
||||||
//--------------------------|
|
//--------------------------|
|
||||||
|
|
||||||
var configArray = ["bot_name","main_color","server_id","auth_token","main_adminroles","prefix","languagefile","credits","status","system","options","messages"]
|
var configArray = ["main_color","server_id","auth_token","main_adminroles","prefix","languagefile","credits","status","system","options","messages"]
|
||||||
configArray.forEach((item) => {
|
configArray.forEach((item) => {
|
||||||
if (config[item] == undefined){
|
if (config[item] == undefined){
|
||||||
throw new Error("\n\nMAIN ERROR: the item '"+item+"' doesn't exist in config.json")
|
throw new Error("\n\nMAIN ERROR: the item '"+item+"' doesn't exist in config.json")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
checkType(config.bot_name,"string","bot_name")
|
|
||||||
checkHexColor(config.main_color,"main_color")
|
checkHexColor(config.main_color,"main_color")
|
||||||
checkDiscord("serverid",config.server_id,"server_id")
|
checkDiscord("serverid",config.server_id,"server_id")
|
||||||
checkToken(config.auth_token)
|
checkToken(config.auth_token)
|
||||||
|
|||||||
@@ -2,14 +2,21 @@ const discord = require("discord.js")
|
|||||||
const api = require("../core/api/api.js")
|
const api = require("../core/api/api.js")
|
||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
const {client,config,events,utils} = api
|
const {client,config,events,utils,actions} = api
|
||||||
|
|
||||||
//this code will run when the bot starts!
|
//this code will run when the bot starts!
|
||||||
|
|
||||||
|
//in this example, we will say "hello" in the console when someone opens a ticket!
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
events.onTicketOpen((user,channel,guild,date,ticketdata) => {
|
events.onTicketOpen((user,channel,guild,date,ticketdata) => {
|
||||||
console.log("hello, someone opened a ticket!")
|
console.log("hello, someone opened a ticket!")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user