deleted the old commands

This commit is contained in:
DJj123dj
2022-05-04 19:02:59 +02:00
parent 4cc12eb727
commit 0f143c7ebb
2 changed files with 4 additions and 50 deletions
-45
View File
@@ -1,45 +0,0 @@
const discord = require('discord.js')
const bot = require('../index')
const client = bot.client
const config = bot.config
//=============================
// NOT READY YET
//=============================
module.exports = () => {
client.on("messageCreate",msg => {
var args = msg.content.split(" ")
if (args[0] == config.prefix+"ticket" && args[1] == "remove"){
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
msg.channel.send({content:config.messages.general.nopermissions})
return
}
msg.channel.messages.fetchPinned().then(msglist => {
if (msglist.last().author.id != client.user.id){
msg.channel.send({content:"You aren't in a ticket!"})
return
}
if (args[2] == null || args[2] == undefined || args[2] == "" || args[2] == false){
msg.channel.send({content:"Not enough parameters!"})
return
}
var user = msg.mentions.users.first()
if (!user){
return
}
msg.channel.permissionOverwrites.delete(user.id)
if (config.logs){console.log("[system] removed user from ticket (name:"+user.username+",ticket:"+msg.channel.name+")")}
})
var loguser = msg.mentions.users.first()
if (config.logs){console.log("[command] "+config.prefix+"ticket remove "+loguser.username+" (user:"+msg.author.username+")")}
}
})
}
+4 -5
View File
@@ -72,14 +72,13 @@ if (process.argv[2] != "slash"){
/** /**
* We need: * We need:
* - checker.js * - checker.js
* - extracmds.js
*/ */
} }
//process.on('unhandledRejection',async (error) => { process.on('unhandledRejection',async (error) => {
// const chalk = await (await import("chalk")).default const chalk = await (await import("chalk")).default
// console.log(chalk.red("ERROR: ")+error) console.log(chalk.red("ERROR: ")+error)
//}) })
client.login(config.auth_token) client.login(config.auth_token)