v2.1.0 push 3
This commit is contained in:
+5
-4
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
client.on("messageCreate",msg => {
|
||||
@@ -20,10 +21,10 @@ module.exports = () => {
|
||||
|
||||
msg.channel.permissionOverwrites.create(user.id, { VIEW_CHANNEL:true, ADD_REACTIONS:true,ATTACH_FILES:true, EMBED_LINKS:true, SEND_MESSAGES:true})
|
||||
msg.channel.send({embeds:[bot.errorLog.success("User Added!",user.tag+" is added to this ticket")]})
|
||||
if (config.logs){console.log("[system] added user to ticket (name:"+user.username+",ticket:"+msg.channel.name+")")}
|
||||
|
||||
var loguser = msg.mentions.users.first()
|
||||
if (config.logs){console.log("[command] "+config.prefix+"add "+loguser.username+" (user:"+msg.author.username+")")}
|
||||
log("command","someone used the 'add' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user added to ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"added_user",value:loguser.tag}])
|
||||
})
|
||||
|
||||
})
|
||||
@@ -47,10 +48,10 @@ module.exports = () => {
|
||||
|
||||
interaction.channel.permissionOverwrites.create(user.id, { VIEW_CHANNEL:true, ADD_REACTIONS:true,ATTACH_FILES:true, EMBED_LINKS:true, SEND_MESSAGES:true})
|
||||
interaction.reply({embeds:[bot.errorLog.success("User Added!",user.tag+" is added to this ticket")]})
|
||||
if (config.logs){console.log("[system] added user to ticket (name:"+user.username+",ticket:"+interaction.channel.name+")")}
|
||||
|
||||
var loguser = user
|
||||
if (config.logs){console.log("[command] "+config.prefix+"add "+loguser.username+" (user:"+interaction.user.username+")")}
|
||||
log("command","someone used the 'add' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user added to ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"added_user",value:loguser.tag}])
|
||||
})
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
client.on("messageCreate",msg => {
|
||||
@@ -24,7 +25,7 @@ module.exports = () => {
|
||||
|
||||
msg.channel.send({embeds:[bot.errorLog.success("Close this ticket!","You can close this ticket by clicking on the button below!")],components:[closebutton]})
|
||||
|
||||
console.log("[system] closed a ticket via command")
|
||||
log("command","someone used the 'close' command",[{key:"user",value:msg.author.tag}])
|
||||
|
||||
})
|
||||
|
||||
@@ -51,7 +52,7 @@ module.exports = () => {
|
||||
|
||||
interaction.reply({embeds:[bot.errorLog.success("Close this ticket!","You can close this ticket by clicking on the button below!")],components:[closebutton]})
|
||||
|
||||
console.log("[system] closed a ticket via command")
|
||||
log("command","someone used the 'close' command",[{key:"user",value:interaction.user.tag}])
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
client.on("messageCreate",msg => {
|
||||
@@ -24,7 +25,7 @@ module.exports = () => {
|
||||
|
||||
msg.channel.send({embeds:[bot.errorLog.success("Delete this ticket!","You can delete this ticket by clicking on the button below!")],components:[closebutton]})
|
||||
|
||||
console.log("[system] deleted a ticket via command")
|
||||
log("command","someone used the 'delete' command",[{key:"user",value:msg.author.tag}])
|
||||
|
||||
})
|
||||
|
||||
@@ -51,7 +52,7 @@ module.exports = () => {
|
||||
|
||||
interaction.reply({embeds:[bot.errorLog.success("Delete this ticket!","You can delete this ticket by clicking on the button below!")],components:[closebutton]})
|
||||
|
||||
console.log("[system] deleted a ticket via command")
|
||||
log("command","someone used the 'close' command",[{key:"user",value:interaction.user.tag}])
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
+3
-1
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
const helpEmbed = new discord.MessageEmbed()
|
||||
@@ -22,7 +23,7 @@ module.exports = () => {
|
||||
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename")){
|
||||
|
||||
msg.channel.send({embeds:[helpEmbed]})
|
||||
if (config.logs){console.log("[command] "+config.prefix+"ticket help (user:"+msg.author.username+")")}
|
||||
log("command","someone used the 'help' command",[{key:"user",value:msg.author.tag}])
|
||||
}
|
||||
})
|
||||
|
||||
@@ -31,5 +32,6 @@ module.exports = () => {
|
||||
if (interaction.commandName != "help") return
|
||||
|
||||
interaction.reply({embeds:[helpEmbed]})
|
||||
log("command","someone used the 'help' command",[{key:"user",value:interaction.user.tag}])
|
||||
})
|
||||
}
|
||||
+7
-4
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
client.on("messageCreate",msg => {
|
||||
@@ -20,10 +21,11 @@ module.exports = () => {
|
||||
|
||||
msg.channel.permissionOverwrites.delete(user.id)
|
||||
msg.channel.send({embeds:[bot.errorLog.success("User removed!",user.tag+" is removed from this ticket")]})
|
||||
if (config.logs){console.log("[system] deleted user from ticket (name:"+user.username+",ticket:"+msg.channel.name+")")}
|
||||
|
||||
var loguser = msg.mentions.users.first()
|
||||
if (config.logs){console.log("[command] "+config.prefix+"remove "+loguser.username+" (user:"+msg.author.username+")")}
|
||||
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","user removed from ticket",[{key:"user",value:msg.author.tag},{key:"ticket",value:msg.channel.name},{key:"removed_user",value:loguser.tag}])
|
||||
})
|
||||
|
||||
})
|
||||
@@ -48,10 +50,11 @@ module.exports = () => {
|
||||
|
||||
interaction.channel.permissionOverwrites.delete(user.id)
|
||||
interaction.reply({embeds:[bot.errorLog.success("User removed!",user.tag+" is removed from this ticket")]})
|
||||
if (config.logs){console.log("[system] removed user from ticket (name:"+user.username+",ticket:"+interaction.channel.name+")")}
|
||||
|
||||
var loguser = user
|
||||
if (config.logs){console.log("[command] "+config.prefix+"remove "+loguser.username+" (user:"+interaction.user.username+")")}
|
||||
|
||||
log("command","someone used the 'remove' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","user removed from ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"removed_user",value:loguser.tag}])
|
||||
})
|
||||
|
||||
|
||||
|
||||
+5
-2
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
module.exports = () => {
|
||||
client.on("messageCreate",msg => {
|
||||
@@ -35,7 +36,8 @@ module.exports = () => {
|
||||
msg.channel.setName(prefix+newname)
|
||||
msg.channel.send({embeds:[bot.errorLog.success("The name has changed!","Warning: you can only change the channel name 2 times per minute!\n(this is due discord rate limits)")]})
|
||||
|
||||
console.log("[system] renamed a ticket via command")
|
||||
log("command","someone used the 'rename' command",[{key:"user",value:msg.author.tag}])
|
||||
log("system","ticket renamed",[{key:"user",value:msg.author.tag},{key:"ticket",value:name},{key:"newname",value:newname}])
|
||||
|
||||
})
|
||||
|
||||
@@ -72,7 +74,8 @@ module.exports = () => {
|
||||
interaction.channel.setName(prefix+newname)
|
||||
interaction.reply({embeds:[bot.errorLog.success("The name has changed!","Warning: you can only change the channel name 2 times per minute!\n(this is due discord rate limits)")]})
|
||||
|
||||
console.log("[system] renamed a ticket via command")
|
||||
log("command","someone used the 'rename' command",[{key:"user",value:interaction.user.tag}])
|
||||
log("system","ticket renamed",[{key:"user",value:interaction.user.tag},{key:"ticket",value:name},{key:"newname",value:newname}])
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
+4
-5
@@ -2,6 +2,7 @@ const discord = require('discord.js')
|
||||
const bot = require('../index')
|
||||
const client = bot.client
|
||||
const config = bot.config
|
||||
const log = bot.errorLog.log
|
||||
|
||||
/** =============================
|
||||
** NOT READY YET
|
||||
@@ -16,7 +17,7 @@ module.exports = () => {
|
||||
|
||||
|
||||
client.on("messageCreate", msg => {
|
||||
if (msg.content.startsWith(config.prefix+"msg")){
|
||||
if (msg.content.startsWith(config.prefix+"msg"||config.prefix+"message")){
|
||||
if (config.main_adminroles.some((item)=>{return msg.member.roles.cache.has(item)}) == false){
|
||||
msg.channel.send({embeds:[bot.errorLog.noPermsMessage]})
|
||||
return
|
||||
@@ -32,8 +33,7 @@ module.exports = () => {
|
||||
|
||||
msg.channel.send({embeds:[embed],components:componentRows})
|
||||
|
||||
if (config.logs){console.log("[command] "+config.prefix+"ticket msg (user:"+msg.author.username+")")}
|
||||
if (config.logs){console.log("[system] created ticket message")}
|
||||
log("command","someone used the 'msg' command",[{key:"user",value:msg.author.tag},{key:"id",value:id}])
|
||||
}
|
||||
})
|
||||
|
||||
@@ -56,8 +56,7 @@ module.exports = () => {
|
||||
interaction.reply({content:"The embed is in the message below!"})
|
||||
interaction.channel.send({embeds:[embed],components:componentRows})
|
||||
|
||||
if (config.logs){console.log("[command] "+config.prefix+"ticket msg (user:"+interaction.member.user.username+")")}
|
||||
if (config.logs){console.log("[system] created ticket message")}
|
||||
log("command","someone used the 'msg' command",[{key:"user",value:interaction.user.tag},{key:"id",value:id}])
|
||||
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user