mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 20:31:47 +00:00
function update
This commit is contained in:
parent
03d97d34fe
commit
316c87c5d5
1 changed files with 10 additions and 5 deletions
|
|
@ -19,15 +19,20 @@ module.exports = class send extends commando.Command {
|
|||
return trySend(this.client, msg, 'Where?!?');
|
||||
}
|
||||
const search = cleanMentionID(comarg[0]),
|
||||
channel = findChannelRegEx(msg, search)[0],
|
||||
sendTheMes = args.slice(comarg[0].length).trim();
|
||||
let channel;
|
||||
if (/^\d{17,19}$/.test(search)) {
|
||||
channel = msg.guild.channels.cache.get(search);
|
||||
}
|
||||
if (!channel) {
|
||||
return trySend(this.client, msg, "That channel is like your gf. Doesn't exist <:cathmmLife:772716381874946068>");
|
||||
} else {
|
||||
if (!channel.permissionsFor(msg.author).has("SEND_MESSAGES")) {
|
||||
return trySend(this.client, msg, "No <:cathmmLife:772716381874946068>");
|
||||
channel = findChannelRegEx(msg, search, ["category", "voice"])[0];
|
||||
if (!channel) {
|
||||
return trySend(this.client, msg, "That channel is like your gf. Doesn't exist <:cathmmLife:772716381874946068>");
|
||||
}
|
||||
}
|
||||
if (!channel.permissionsFor(msg.author).has("SEND_MESSAGES")) {
|
||||
return trySend(this.client, msg, "No <:cathmmLife:772716381874946068>");
|
||||
}
|
||||
try {
|
||||
if (sendTheMes.length === 0) {
|
||||
return trySend(this.client, channel, `<@!${msg.author.id}> If you wanna send nothin then why you even typed that <:bruhLife:798789686242967554>`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue