forked from Supositware/Haha-Yes
let people use this command without manage message perm
This commit is contained in:
parent
4e86a6f3c5
commit
422a7b69db
1 changed files with 10 additions and 3 deletions
|
@ -7,7 +7,7 @@ class SayCommand extends Command {
|
||||||
super('say', {
|
super('say', {
|
||||||
aliases: ['say', 'sayd'],
|
aliases: ['say', 'sayd'],
|
||||||
category: 'general',
|
category: 'general',
|
||||||
clientPermissions: ['SEND_MESSAGES', 'MANAGE_MESSAGES'],
|
clientPermissions: ['SEND_MESSAGES'],
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
id: 'text',
|
id: 'text',
|
||||||
|
@ -148,11 +148,18 @@ class SayCommand extends Command {
|
||||||
// Send the final text
|
// Send the final text
|
||||||
if (attach) {
|
if (attach) {
|
||||||
if (message.util.parsed.alias == 'sayd')
|
if (message.util.parsed.alias == 'sayd')
|
||||||
|
if (message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
|
||||||
message.delete();
|
message.delete();
|
||||||
|
else
|
||||||
|
message.channel.send('Im missing he `MANAGE_MESSAGES` perm to delete your message!');
|
||||||
|
|
||||||
return message.channel.send(text, {files: [attach]});
|
return message.channel.send(text, {files: [attach]});
|
||||||
} else {
|
} else {
|
||||||
if (message.util.parsed.alias == 'sayd')
|
if (message.util.parsed.alias == 'sayd')
|
||||||
|
if (message.channel.permissionsFor(this.client.user).has('MANAGE_MESSAGES'))
|
||||||
message.delete();
|
message.delete();
|
||||||
|
else
|
||||||
|
message.channel.send('Im missing he `MANAGE_MESSAGES` perm to delete your message!');
|
||||||
return message.channel.send(text);
|
return message.channel.send(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue