Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec0096cdd3 | ||
|
|
66966c7fd6 | ||
|
|
6b1f010f32 | ||
|
|
62077831b4 | ||
|
|
7ab1b78de1 | ||
|
|
8e80c38255 | ||
|
|
d39e0226fc | ||
|
|
759a1032c3 | ||
|
|
424d5721b5 | ||
|
|
a0a2308270 | ||
|
|
a1edacd4db | ||
|
|
8ace046edf | ||
|
|
b07139bda9 | ||
|
|
449131e990 | ||
|
|
cd799a8974 | ||
|
|
c41849eb51 | ||
|
|
adb40b3bb8 | ||
|
|
7565a75575 | ||
|
|
e79ba906af | ||
|
|
a4025837a7 | ||
|
|
9c835a2503 | ||
|
|
2e43637d67 | ||
|
|
50fcd6900c | ||
|
|
96fc4f8fe4 | ||
|
|
9a4bd50dd6 | ||
|
|
98ea99e879 |
No files matched your search
@@ -12,3 +12,4 @@ dev.js
|
||||
|
||||
# Logs
|
||||
logs/*
|
||||
Logs.log
|
||||
@@ -1,93 +0,0 @@
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Client has been logged in"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Client has been logged in"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"21:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Successfully Logged in as LPC-Bot Alpha#5344"}
|
||||
{"level":"info","message":"22:function getMinutes() { [native code] } - 7:2:2022 | Info: Interaction"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Command Loaded: help"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Command Loaded: stats"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Event Loaded: guildCreate"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Event Loaded: message"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Event Loaded: ready"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Error: ENOENT: no such file or directory, scandir 'C:\\Users\\flami\\Desktop\\Projects\\commands'"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Error: ENOENT: no such file or directory, scandir 'C:\\Users\\flami\\Desktop\\Projects\\events'"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Error: ENOENT: no such file or directory, scandir 'C:\\Users\\flami\\Desktop\\Projects\\commands'"}
|
||||
{"level":"info","message":"11:function getMinutes() { [native code] } - 8:2:2022 | Info: Error: ENOENT: no such file or directory, scandir 'C:\\Users\\flami\\Desktop\\Projects\\events'"}
|
||||
@@ -1,2 +1,2 @@
|
||||
Worker: node index.js
|
||||
BetaWorker: node beta.js
|
||||
Worker: node --optimize_for_size --max-old-space-size=2560 index.js
|
||||
BetaWorker: node --optimize_for_size --max-old-space-size=2560 beta.js
|
||||
@@ -1,6 +0,0 @@
|
||||
const LinesPoliceCadBot = require('./structures/LinesPoliceCadBot');
|
||||
const config = require('./config/beta-config');
|
||||
const { Intents } = require('discord.js');
|
||||
|
||||
let client = new LinesPoliceCadBot({ intents:[Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]}, config);
|
||||
client.build()
|
||||
+1
-1
@@ -39,7 +39,7 @@ module.exports = {
|
||||
client.users.fetch(interaction.member.user.id)
|
||||
.then(duser => duser.send(`<@${interaction.member.user.id}> Logged in as **${user.user.username}** | **${user.user.email}**`).catch(err => {client.log(err)}))
|
||||
.catch(err => {client.log(err)});
|
||||
return
|
||||
return interaction.send('Your account details have been sent in your dm.');
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -30,7 +30,6 @@ module.exports = {
|
||||
let targetUser = await client.dbo.collection("users").findOne({"user.discord.id":targetUserID}).then(user => user);
|
||||
// This lame line of code to get username without ping on discord
|
||||
const User = client.users.cache.get(targetUserID);
|
||||
console.log(targetUserID, targetUser);
|
||||
if (!targetUser) return message.channel.send(`Cannot find **${args[0].value}** ${message.author}`);
|
||||
if (targetUser.user.activeCommunity!=user.user.activeCommunity) {
|
||||
return message.channel.send(`You are not in the same community as \`${User.tag}\` ${message.author}`);
|
||||
@@ -73,8 +72,7 @@ module.exports = {
|
||||
let targetUser = await client.dbo.collection("users").findOne({"user.discord.id":targetUserID}).then(user => user);
|
||||
// This lame line of code to get username without ping on discord
|
||||
const User = client.users.cache.get(targetUserID);
|
||||
console.debug(targetUserID, targetUser, User);
|
||||
if (!targetUser) return message.channel.send(`Cannot find **${args[0].value}** <@${interaction.member.user.id}>`);
|
||||
if (!targetUser) return interaction.send(`Cannot find **${args[0].value}** <@${interaction.member.user.id}>`);
|
||||
if (targetUser.user.activeCommunity!=user.user.activeCommunity) {
|
||||
return interaction.send(`You are not in the same community as \`${User.tag}\` <@${interaction.member.user.id}>`);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const ObjectId = require('mongodb').ObjectId;
|
||||
|
||||
module.exports = {
|
||||
name: "community",
|
||||
@@ -40,7 +41,7 @@ module.exports = {
|
||||
|
||||
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user);
|
||||
if (!user) return interaction.send(`You are not logged in.`);
|
||||
if (user.user.activeCommunity==null) return message.channel.send(`You are not in a community.`);
|
||||
if (user.user.activeCommunity==null) return interaction.send(`You are not in a community.`);
|
||||
let community = await client.dbo.collection("communities").findOne({_id:ObjectId(user.user.activeCommunity)}).then(community => community);
|
||||
if (!community) return interaction.send(`Community not found.`);
|
||||
return interaction.send(`You are in the community \`${community.community.name}\``);
|
||||
|
||||
@@ -100,7 +100,7 @@ module.exports = {
|
||||
socket.on('bot_firearm_search_results', results => {
|
||||
if (results.user._id==user._id) {
|
||||
if (results.firearms.length==0) {
|
||||
return interaction.send(`No Firearms found ${message.author}`);
|
||||
return interaction.send(`No Firearms found <@${interaction.member.user.id}>`);
|
||||
}
|
||||
|
||||
for (let i = 0; i < results.firearms.length; i++) {
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ module.exports = {
|
||||
}help [Command] | Have a nice day!`
|
||||
).setDescription(`${Commands.join("\n")}
|
||||
|
||||
Lines Police CAD Bot Version: v${client.Version}`);
|
||||
Lines Police CAD Bot Version: v${client.config.Version}`);
|
||||
if (!args) return interaction.send(Embed);
|
||||
else {
|
||||
let cmd =
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ module.exports = {
|
||||
socket.emit('panic_button_update', req);
|
||||
socket.disconnect();
|
||||
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":GuildDB.serverID}).then(guild => guild);
|
||||
if (guild.server.pingOnPanic) return message.channel.send(`Attention <@&${guild.server.pingRole}>! \`${user.user.username}\` has activated panic`);
|
||||
if (guild.server.pingOnPanic) return interaction.send(`Attention <@&${guild.server.pingRole}>! \`${user.user.username}\` has activated panic`);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = {
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message, args) => {
|
||||
run: async (client, message, args, { GuildDB }) => {
|
||||
let useCommand = await client.verifyUseCommand(GuildDB.serverID, message.member.roles.cache, false);
|
||||
if (!useCommand) return message.channel.send("You don't have permission to use this command");
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = {
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message) => {
|
||||
run: async (client, message, args) => {
|
||||
if (args.length==0) return message.channel.send(`You must provide a channel.`);
|
||||
let channelid = args[0].replace('<#', '').replace('>', '');
|
||||
let channel = client.channels.cache.get(channelid);
|
||||
@@ -54,11 +54,11 @@ module.exports = {
|
||||
|
||||
let channelid = args[0].value;
|
||||
let channel = client.channels.cache.get(channelid);
|
||||
if (!channel) return message.channel.send(`Cannot find that channel.`);
|
||||
if (!channel) return interaction.send(`Cannot find that channel.`);
|
||||
if (channel.type=="voice") return interaction.send(`Connot set voice channel to preferred channel.`);
|
||||
if (channel.deleted) return interaction.send(`Connot set deleted channel to preferred channel.`);
|
||||
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":interaction.guild.id}).then(guild => guild);
|
||||
if (exists(guild.server.allowedChannels)&&guild.server.allowedChannels.includes(channelid)) return interaction.send(`The channel <#${args[0].value}> has already been added.`);
|
||||
if (client.exists(guild.server.allowedChannels)&&guild.server.allowedChannels.includes(channelid)) return interaction.send(`The channel <#${args[0].value}> has already been added.`);
|
||||
client.dbo.collection("prefixes").updateOne({"server.serverID":interaction.guild.id},{$push:{"server.allowedChannels":channelid},$set:{"server.hasCustomChannels":true}},function(err, res) {
|
||||
if (err) throw err;
|
||||
return interaction.send(`Successfully added <#${args[0].value}> to allowed channels.`);
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ module.exports = {
|
||||
return interaction.send(`Uh Oh! The role <@&${args[0].value}> connot be found.`);
|
||||
} else {
|
||||
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":interaction.guild.id}).then(guild => guild);
|
||||
if (exists(guild.server.allowedRoles)&&guild.server.allowedRoles.includes(roleid)) return interaction.send(`The role <@&${args[0].value}> has already been added.`);
|
||||
if (client.exists(guild.server.allowedRoles)&&guild.server.allowedRoles.includes(roleid)) return interaction.send(`The role <@&${args[0].value}> has already been added.`);
|
||||
client.dbo.collection("prefixes").updateOne({"server.serverID":interaction.guild.id},{$push:{"server.allowedRoles":roleid},$set:{"server.hasCustomRoles":true}},function(err, res) {
|
||||
if (err) throw err;
|
||||
return interaction.send(`Successfully added <@&${args[0].value}> to allowed roles.`);
|
||||
|
||||
@@ -86,8 +86,8 @@ module.exports = {
|
||||
if (!useCommand) return interaction.send("You don't have permission to use this command");
|
||||
|
||||
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user);
|
||||
if (!user) return interaction.send(`You are not logged in ${message.author}`);
|
||||
if (user.user.activeCommunity==null) return message.channel.send(`You must join a community to use this command.`);
|
||||
if (!user) return interaction.send(`You are not logged in <@${interactoin.member.user.id}>`);
|
||||
if (user.user.activeCommunity==null) return interaction.send(`You must join a community to use this command.`);
|
||||
let onDuty=null;
|
||||
let updateDuty=false;
|
||||
let status = args[0].value;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
module.exports = {
|
||||
Dev: "DEVELOPMENT",
|
||||
Version: "3.0.0 Beta",
|
||||
Admins: ["362791661274660874"], // Admins of the bot
|
||||
defaultPrefix: "?",
|
||||
socket: "https://police-cad-dev.herokuapp.com/",
|
||||
SupportServer: "https://discord.gg/w2g2FFmHbF", //Support Server Link
|
||||
Token: process.env.TOKEN || "", //Discord Bot Token
|
||||
Scopes: ["identify", "guilds", "applications.commands"], //Discord OAuth2 Scopes
|
||||
IconURL: "https://raw.githubusercontent.com/Linesmerrill/police-cad/master/lines-police-cad.png",
|
||||
EmbedColor: "#0099ff",
|
||||
Permissions: 2205281600,
|
||||
Website: "https://linespolice-cad.com",
|
||||
api_url: process.env.API_URL || "",
|
||||
api_token: process.env.API_TOKEN || "",
|
||||
mongoURI: process.env.mongoURI || "mongodb://localhost:27017",
|
||||
dbo: process.env.dbo || "knoldus",
|
||||
|
||||
Presence: {
|
||||
status: "online", // You can show online, idle, and dnd
|
||||
name: "GTA V", // The message shown
|
||||
type: "PLAYING", // PLAYING, WATCHING, LISTENING, STREAMING
|
||||
},
|
||||
}
|
||||
+3
-3
@@ -2,10 +2,10 @@ module.exports = {
|
||||
Dev: "PRODUCTION",
|
||||
Version: "3.0.0",
|
||||
Admins: ["362791661274660874"], // Admins of the bot
|
||||
defaultPrefix: "?",
|
||||
socket: "https://linespolice-cad.com/",
|
||||
DefaultPrefix: "?",
|
||||
socket: "https://www.linespolice-cad.com/",
|
||||
SupportServer: "https://discord.gg/w2g2FFmHbF", //Support Server Link
|
||||
Token: process.env.TOKEN || "", //Discord Bot Token
|
||||
Token: process.env.token || "", //Discord Bot Token
|
||||
Scopes: ["identify", "guilds", "applications.commands"], //Discord OAuth2 Scopes
|
||||
IconURL: "https://raw.githubusercontent.com/Linesmerrill/police-cad/master/lines-police-cad.png",
|
||||
EmbedColor: "#0099ff",
|
||||
|
||||
@@ -103,7 +103,7 @@ class LinesPoliceCadBot extends Client {
|
||||
});
|
||||
}
|
||||
|
||||
exists(n){return null!=n&&null!=n&&""!=n}
|
||||
exists(n) {return null != n && undefined != n && "" != n}
|
||||
|
||||
LoadCommands() {
|
||||
let CommandsDir = path.join(__dirname, '..', 'commands');
|
||||
@@ -245,7 +245,6 @@ class LinesPoliceCadBot extends Client {
|
||||
Channel.send(embed);
|
||||
}
|
||||
|
||||
|
||||
build() {
|
||||
this.login(this.config.Token);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,12 @@ module.exports = (client, guild) => {
|
||||
try {
|
||||
await GuildAPI.commands.post({ data: dataStuff });
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
client.log('Error: API missing permissions, re-invite the bot');
|
||||
|
||||
// Forces bot to leave server
|
||||
let guildID = client.guilds.cache.get(guild);
|
||||
if (guildID) guildID.leave();
|
||||
client.log(`Server stats is now down to ${client.guilds.cache.size}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user