mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 10:46:14 +10:00
permissions, category set
This commit is contained in:
4
index.js
4
index.js
@@ -92,7 +92,7 @@ client.on("message", (msg) => {
|
||||
})
|
||||
|
||||
function onMessage(msg, again = true) {
|
||||
if (msg.channel.type = "dm") {
|
||||
if (msg.channel.type == "dm") {
|
||||
doPMCommand(msg, "")
|
||||
}
|
||||
else {
|
||||
@@ -125,7 +125,7 @@ function doPMCommand(msg, prefix) {
|
||||
if (cmds.length > 0) {
|
||||
console.log("CMD:".green + " ".reset + msg.author.username.bold + "#".reset + msg.author.discriminator.reset + " " + prefix.grey + command.green.bold + " ".reset + msg.suffix + " | PM")
|
||||
var reqcommand = require('./commands/' + cmds[0].file)
|
||||
if (reqcommand.permissions == 'READ_MESSAGES') {
|
||||
if (reqcommand.category == 'general') {
|
||||
msg.react('✅')
|
||||
try {
|
||||
reqcommand.command(client, msg)
|
||||
|
||||
Reference in New Issue
Block a user