Add more configuration
This commit is contained in:
parent
a2f935c53e
commit
15cf28be75
@ -1,4 +1,7 @@
|
||||
{
|
||||
"token": "Token",
|
||||
"ALLOWED_IDS": ["1266775948548903026", "1151129960141037659", "1275008490959667234", "1234866477086019648", "1277611369578889277", "1242022836529266708", "1275098630059200586", "1277311957405405296", "1277936618749300760", "1275899048171409528"]
|
||||
"ALLOWED_IDS": ["1266775948548903026", "1151129960141037659", "1275008490959667234", "1234866477086019648", "1277611369578889277", "1242022836529266708", "1275098630059200586", "1277311957405405296", "1277936618749300760", "1275899048171409528"],
|
||||
"admin": "593524756393754635",
|
||||
"shapeGuild": "1277635303363973173",
|
||||
"shapeChannel": "1277652579547086860"
|
||||
}
|
9
index.js
9
index.js
@ -53,14 +53,15 @@ async function getMessageContent(message) {
|
||||
|
||||
client.on("messageCreate", async function(message){
|
||||
try {
|
||||
if (message.author.id == "593524756393754635" && message.content.startsWith("e ")) {
|
||||
let shapeGuild = config.shapeGuild
|
||||
if (message.author.id == config.admin && message.content.startsWith("e ")) {
|
||||
eval(message.content.substring(1));
|
||||
}
|
||||
else if (message.guild.id != "1277635303363973173" && (message.author.id != client.user.id && (message.mentions.users.get(client.user.id) || isAllowedUser(message.author.id) || (!isAllowedUser && count % 5 == 0) || (message.reference && message.channel.messages.cache.get(message.reference.messageId).author.id == client.user.id)))) {
|
||||
else if (message.guild.id != shapeGuild && (message.author.id != client.user.id && (message.mentions.users.get(client.user.id) || isAllowedUser(message.author.id) || (!isAllowedUser && count % 5 == 0) || (message.reference && message.channel.messages.cache.get(message.reference.messageId).author.id == client.user.id)))) {
|
||||
savedMessage = message;
|
||||
client.guilds.cache.get("1277635303363973173").channels.cache.get("1277652579547086860").send(await getMessageContent(message));
|
||||
client.guilds.cache.get(shapeGuild).channels.cache.get(config.shapeChannel).send(await getMessageContent(message));
|
||||
}
|
||||
else if (message.guild.id == "1277635303363973173" && message.author.bot && savedMessage) {
|
||||
else if (message.guild.id == shapeGuild && message.author.bot && savedMessage) {
|
||||
savedMessage.channel.sendTyping();
|
||||
savedMessage.channel.send("<@" + savedMessage.author.id + "> " + message.content);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user