mirror of
https://github.com/danbulant/Shasha
synced 2026-06-08 09:00:24 +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?!?');
|
return trySend(this.client, msg, 'Where?!?');
|
||||||
}
|
}
|
||||||
const search = cleanMentionID(comarg[0]),
|
const search = cleanMentionID(comarg[0]),
|
||||||
channel = findChannelRegEx(msg, search)[0],
|
|
||||||
sendTheMes = args.slice(comarg[0].length).trim();
|
sendTheMes = args.slice(comarg[0].length).trim();
|
||||||
|
let channel;
|
||||||
|
if (/^\d{17,19}$/.test(search)) {
|
||||||
|
channel = msg.guild.channels.cache.get(search);
|
||||||
|
}
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
return trySend(this.client, msg, "That channel is like your gf. Doesn't exist <:cathmmLife:772716381874946068>");
|
channel = findChannelRegEx(msg, search, ["category", "voice"])[0];
|
||||||
} else {
|
if (!channel) {
|
||||||
if (!channel.permissionsFor(msg.author).has("SEND_MESSAGES")) {
|
return trySend(this.client, msg, "That channel is like your gf. Doesn't exist <:cathmmLife:772716381874946068>");
|
||||||
return trySend(this.client, msg, "No <:cathmmLife:772716381874946068>");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!channel.permissionsFor(msg.author).has("SEND_MESSAGES")) {
|
||||||
|
return trySend(this.client, msg, "No <:cathmmLife:772716381874946068>");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (sendTheMes.length === 0) {
|
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>`);
|
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