fix errors
This commit is contained in:
parent
0621386e55
commit
761157e693
@ -20,7 +20,7 @@ function addCommands(plugin: UtilityPlugin, commands: any): void {
|
|||||||
if (!simplified[0]) {
|
if (!simplified[0]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const script = msg.data.split(' ').slice(1).join(' ');
|
const script = simplified.join(' ');
|
||||||
|
|
||||||
// Disallow child_process when shell is disallowed
|
// Disallow child_process when shell is disallowed
|
||||||
if ((script.indexOf('child_process') !== -1 ||
|
if ((script.indexOf('child_process') !== -1 ||
|
||||||
|
@ -67,7 +67,7 @@ class DictionPlugin extends Plugin {
|
|||||||
pos = '';
|
pos = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const word = encodeURIComponent(msg.text.split(' ').slice(pos ? 2 : 1).join(' '));
|
const word = encodeURIComponent(simplified.slice(pos ? 1 : 0).join(' '));
|
||||||
|
|
||||||
if (!word) {
|
if (!word) {
|
||||||
msg.resolve('Please specifiy a word or term!');
|
msg.resolve('Please specifiy a word or term!');
|
||||||
@ -111,6 +111,7 @@ class DictionPlugin extends Plugin {
|
|||||||
msg.resolve(str);
|
msg.resolve(str);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
match: /define (\w*)/,
|
||||||
aliases: ['df'],
|
aliases: ['df'],
|
||||||
description: 'Find definitions for words',
|
description: 'Find definitions for words',
|
||||||
usage: '[<pos>] <word>'
|
usage: '[<pos>] <word>'
|
||||||
|
@ -61,7 +61,10 @@ class FunPlugin extends Plugin {
|
|||||||
name: 'hug',
|
name: 'hug',
|
||||||
plugin: this.name,
|
plugin: this.name,
|
||||||
execute: async (msg: IMessage): Promise<boolean> => {
|
execute: async (msg: IMessage): Promise<boolean> => {
|
||||||
msg.resolve(msg.source.format.format('action', 'hugs %s'), msg.sender?.name);
|
if (!msg.sender) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
msg.resolve(msg.source.format.format('action', 'hugs %s'), msg.mention(msg.sender));
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
hidden: true
|
hidden: true
|
||||||
|
Loading…
Reference in New Issue
Block a user