Rollback April Fools'
All checks were successful
NodBot Production Dockerization / build (push) Successful in 25s
All checks were successful
NodBot Production Dockerization / build (push) Successful in 25s
This commit is contained in:
parent
b10b126dc9
commit
e88b33c4ed
16
main.js
16
main.js
@ -32,7 +32,6 @@ const ButtonHandlers = require('./CustomModules/ButtonHandlers.js');
|
|||||||
const InteractionStorage = require('./CustomModules/InteractionStorage.js');
|
const InteractionStorage = require('./CustomModules/InteractionStorage.js');
|
||||||
const isDev = process.env.isDev;
|
const isDev = process.env.isDev;
|
||||||
let statusChannel;
|
let statusChannel;
|
||||||
const announcementChannelId = '893183933645197312';
|
|
||||||
|
|
||||||
client.once('ready', async () => {
|
client.once('ready', async () => {
|
||||||
fn.collections.interactionStorage(client);
|
fn.collections.interactionStorage(client);
|
||||||
@ -53,9 +52,6 @@ client.once('ready', async () => {
|
|||||||
// console.log(JSON.stringify(icaoArray));
|
// console.log(JSON.stringify(icaoArray));
|
||||||
statusChannel = await client.channels.fetch(statusChannelId).catch(e => console.error(e));
|
statusChannel = await client.channels.fetch(statusChannelId).catch(e => console.error(e));
|
||||||
await statusChannel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`).catch(e => console.error(e));
|
await statusChannel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`).catch(e => console.error(e));
|
||||||
|
|
||||||
const announcementChannel = await client.channels.fetch(announcementChannelId).catch(e => console.error(e));
|
|
||||||
await announcementChannel.send(fn.embeds.membershipAnnouncement()).catch(e => console.error(e));
|
|
||||||
// Check for banned servers
|
// Check for banned servers
|
||||||
fn.checkBannedServers(client, statusChannel);
|
fn.checkBannedServers(client, statusChannel);
|
||||||
});
|
});
|
||||||
@ -73,11 +69,7 @@ client.on('interactionCreate', async interaction => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (client.slashCommands.has(commandName)) {
|
if (client.slashCommands.has(commandName)) {
|
||||||
if (fn.checkMembership(client, interaction.user.id)) {
|
client.slashCommands.get(commandName).execute(interaction);
|
||||||
client.slashCommands.get(commandName).execute(interaction);
|
|
||||||
} else {
|
|
||||||
interaction.reply(fn.embeds.noMembership());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
interaction.reply('Sorry, I don\'t have access to that command.');
|
interaction.reply('Sorry, I don\'t have access to that command.');
|
||||||
console.error('Slash command attempted to run but not found: ' + commandName);
|
console.error('Slash command attempted to run but not found: ' + commandName);
|
||||||
@ -147,11 +139,7 @@ client.on('messageCreate', message => {
|
|||||||
|
|
||||||
if (commandData.isValid && commandData.isCommand) {
|
if (commandData.isValid && commandData.isCommand) {
|
||||||
try {
|
try {
|
||||||
if (fn.checkMembership(client, message.member.user.id)) {
|
client.dotCommands.get(commandData.command).execute(message, commandData);
|
||||||
client.dotCommands.get(commandData.command).execute(message, commandData);
|
|
||||||
} else {
|
|
||||||
message.reply(fn.embeds.noMembership());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user