Fix
This commit is contained in:
parent
c570d9aa2c
commit
e43220c758
1 changed files with 4 additions and 1 deletions
5
index.js
5
index.js
|
@ -2,6 +2,9 @@ const dc = require("discord.js");
|
||||||
const client = new dc.Client({intents: ["GUILDS", "GUILD_MESSAGES"]});
|
const client = new dc.Client({intents: ["GUILDS", "GUILD_MESSAGES"]});
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const allowed = ["831598877320413244"];
|
const allowed = ["831598877320413244"];
|
||||||
|
const senders = allowed.join(",").split(",");
|
||||||
|
senders.push("827108172325847051");
|
||||||
|
senders.push("246721024102498304");
|
||||||
|
|
||||||
function isDir(path){
|
function isDir(path){
|
||||||
try{
|
try{
|
||||||
|
@ -136,7 +139,7 @@ client.on("interactionCreate", (int) => {
|
||||||
int.reply({embeds: [embed], components: [msgRow]});
|
int.reply({embeds: [embed], components: [msgRow]});
|
||||||
} else if(int.commandName == "send"){
|
} else if(int.commandName == "send"){
|
||||||
console.log("Send!");
|
console.log("Send!");
|
||||||
if(!allowed.includes(int.user.id)) return int.reply({content: "You don't have permissions to use this command.", ephemeral: true});
|
if(!senders.includes(int.user.id)) return int.reply({content: "You don't have permissions to use this command.", ephemeral: true});
|
||||||
var channel = int.options.getChannel("channel") || int.channel;
|
var channel = int.options.getChannel("channel") || int.channel;
|
||||||
var message = int.options.getString("message");
|
var message = int.options.getString("message");
|
||||||
channel.send(message).then(msg => {
|
channel.send(message).then(msg => {
|
||||||
|
|
Loading…
Reference in a new issue