mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
update permissions
This commit is contained in:
parent
c818989127
commit
0b83136fbe
5 changed files with 26 additions and 10 deletions
|
|
@ -13,7 +13,8 @@ module.exports = class newquoteotd extends commando.Command {
|
|||
memberName: "newquoteotd",
|
||||
group: "utility",
|
||||
description: "The Life exclusive command for Quote of the day.",
|
||||
guildOnly: true
|
||||
guildOnly: true,
|
||||
userPermissions:"ADMINISTRATOR"
|
||||
});
|
||||
}
|
||||
async run(msg, arg) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ module.exports = class quoteotd extends commando.Command {
|
|||
group: "utility",
|
||||
description: "Set Quote of the day channel and settings.",
|
||||
details:"```\n--channel\n--text\n--icon```",
|
||||
guildOnly: true
|
||||
guildOnly: true,
|
||||
userPermissions:"ADMINISTRATOR"
|
||||
});
|
||||
}
|
||||
async run(msg, arg) {
|
||||
|
|
|
|||
|
|
@ -17,8 +17,12 @@ module.exports = class say extends commando.Command {
|
|||
if (!args) {
|
||||
args = noArgs;
|
||||
}
|
||||
trySend(this.client, msg, args);
|
||||
if (args !== noArgs && msg.channel.guild) {
|
||||
const sendThis = {content:args, disableMentions:"all"};
|
||||
if (msg.member?.hasPermission("ADMINISTRATOR")) {
|
||||
sendThis.disableMentions = "none";
|
||||
}
|
||||
trySend(this.client, msg, sendThis);
|
||||
if (args !== noArgs && msg.channel.guild && msg.member.hasPermission("MANAGE_MESSAGES")) {
|
||||
tryDelete(msg);
|
||||
}
|
||||
return ranLog(msg,'say',`Content: ${args}`);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ module.exports = class send extends commando.Command {
|
|||
name: "send",
|
||||
memberName: "send",
|
||||
group: "utility",
|
||||
description: "Send message to designated channel."
|
||||
description: "Send message to designated channel.",
|
||||
userPermissions:"MANAGE_MESSAGES"
|
||||
});
|
||||
}
|
||||
async run(msg, args ) {
|
||||
|
|
@ -30,7 +31,11 @@ module.exports = class send extends commando.Command {
|
|||
if (sendTheMes.length === 0) {
|
||||
return trySend(this.client, at, `<@!${msg.author.id}> If you wanna send nothin then why you even typed that <:bruhLife:798789686242967554>`);
|
||||
}
|
||||
const send = await channel.send(sendTheMes);
|
||||
const sendThis = {content:sendTheMes, disableMentions:"all"};
|
||||
if (msg.member?.hasPermission("ADMINISTRATOR")) {
|
||||
sendThis.disableMentions = "none";
|
||||
}
|
||||
const send = await trySend(this.client, msg, sendThis);
|
||||
sentAdCheck(send);
|
||||
const filter = () => true;
|
||||
const collector = send.createReactionCollector(filter, {time: 15*6*1000, dispose:true});
|
||||
|
|
|
|||
|
|
@ -9,13 +9,18 @@ const getColor = require("../../resources/getColor");
|
|||
module.exports = class servav extends commando.Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: "servav",
|
||||
memberName: "servav",
|
||||
aliases: ["serveravatar", "servavatar", "serverav"],
|
||||
name: "serv-av",
|
||||
memberName: "serv-av",
|
||||
aliases: ["server-avatar", "serv-avatar", "server-av"],
|
||||
group: "utility",
|
||||
description: "Show server avatar."
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {commando.CommandoMessage} msg
|
||||
* @param {*} arg
|
||||
*/
|
||||
run(msg, arg) {
|
||||
const server_ID = arg.split(/ +/)[0];
|
||||
const doc = msg.guild?.id ?? msg.author.id;
|
||||
|
|
@ -26,7 +31,7 @@ module.exports = class servav extends commando.Command {
|
|||
}
|
||||
const footerQuote = res?.["settings"]?.defaultEmbed?.footerQuote;
|
||||
let icon, target;
|
||||
if (server_ID) {
|
||||
if (server_ID && this.client.owners.includes(msg.author.id)) {
|
||||
if (!/\D/.test(server_ID)) {
|
||||
target = this.client.guilds.cache.get(server_ID);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue