update/add logs and update prefix
This commit is contained in:
1 parent
0495577b3c
commit
2c1d15cfc4
9 files changed
+228
-31
No files matched your search
+5
-2
@@ -11,7 +11,7 @@ module.exports = {
|
||||
aliases: ["command", "commands", "cmd"],
|
||||
/**
|
||||
*
|
||||
* @param {import("../LPS")} client
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
@@ -91,13 +91,16 @@ module.exports = {
|
||||
],
|
||||
/**
|
||||
*
|
||||
* @param {import("../LPS")} client
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
let Commands = client.commands.map(
|
||||
(cmd) =>
|
||||
`\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}${
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "ping",
|
||||
description: "check the bots responce",
|
||||
usage: "",
|
||||
permissions: {
|
||||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||
member: [],
|
||||
},
|
||||
aliases: [],
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message) => {
|
||||
return message.channel.send('Pong!');
|
||||
},
|
||||
SlashCommand: {
|
||||
options: [],
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
interaction.send('Pong!');
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "setprefix",
|
||||
description: "Update prefix for the bot",
|
||||
usage: "[new Prefix]",
|
||||
permissions: {
|
||||
channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
|
||||
member: ["MANAGE_GUILD"],
|
||||
},
|
||||
aliases: ["newprefix", "new_prefix", "set_prefix"],
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message, args, { GuildDB }) => {
|
||||
if (args[0]==undefined) return message.channel.send(`You must provide a \`new prefix\` ${message.author}`);
|
||||
if (args[0].length<1) return message.channel.send('Your new prefix must be \`1\` character!')
|
||||
client.dbo.collection("prefixes").updateOne({"server.serverID":GuildDB.serverID},{$set:{"server.prefix":args[0]}},function(err, res) {
|
||||
if (err) throw err;
|
||||
message.channel.send(`The new prefix is now **\`${args[0]}\`**`);
|
||||
});
|
||||
},
|
||||
SlashCommand: {
|
||||
options: [
|
||||
{
|
||||
name: "new-prefix",
|
||||
description: "Update prefix for the bot",
|
||||
value: "setprefix",
|
||||
type: 3,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
if (args[0].length<1) return interaction.send('Your new prefix must be \`1\` character!')
|
||||
client.dbo.collection("prefixes").updateOne({"server.serverID":GuildDB.serverID},{$set:{"server.prefix":args[0].value}},function(err, res) {
|
||||
if (err) throw err;
|
||||
interaction.send(`The new prefix is now **\`${args[0].value}\`**`);
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
+7
-4
@@ -12,7 +12,7 @@ module.exports = {
|
||||
aliases: ["stat", "statistics", "info"],
|
||||
/**
|
||||
*
|
||||
* @param {import("../LPS")} client
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
@@ -30,12 +30,15 @@ module.exports = {
|
||||
SlashCommand: {
|
||||
/**
|
||||
*
|
||||
* @param {import("../LPS")} client
|
||||
* @param {require("../structures/LinesPoliceCadBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, interaction) => {
|
||||
run: async (client, interaction, args, { GuildDB }) => {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
const { version } = require("discord.js");
|
||||
const stats = new MessageEmbed()
|
||||
.setColor('#0099ff')
|
||||
@@ -44,7 +47,7 @@ module.exports = {
|
||||
.addField(" \u200B ", "**Channels** : ` " + `${client.channels.cache.size}` + " `")
|
||||
.addField(" \u200B ", "**Servers** : ` " + `${client.guilds.cache.size}` + " `")
|
||||
.addField(" \u200B ", "**Users** : ` " + `${client.users.cache.size}` + " `")
|
||||
return message.channel.send(stats)
|
||||
interaction.send(stats)
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user