WIP: v3.4.0 #25

Draft
voidf1sh wants to merge 21 commits from v3.4.0 into main
Showing only changes of commit 2cbfc7f354 - Show all commits

View File

@ -16,6 +16,17 @@ module.exports = {
if (this.args.startsWith('http')) return false; if (this.args.startsWith('http')) return false;
if (this.args.startsWith('www')) return false; if (this.args.startsWith('www')) return false;
// Check for and extract the part of the message that's
// wrapped in any type of brackets or quotes eg. ([{``''""}])
const bracketStart = this.args.match(/[\[\(\{\`\'\"\`]/g);
const bracketEnd = this.args.match(/[\]\)\}\`\'\"\`]/g);
let bracketedText = new String();
if ((bracketStart && bracketEnd) && (bracketStart.length !== bracketEnd.length)) {
bracketedText = this.args.slice(this.args.indexOf(bracketStart[0]), this.args.lastIndexOf(bracketEnd[0]) + 1);
this.args = this.args.replace(bracketedText, '');
}
console.log(bracketedText);
for (const [key, value] of dotCommands) { for (const [key, value] of dotCommands) {
if (key === this.command) { if (key === this.command) {
this.isValid = true; this.isValid = true;