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]) {
|
||||
return true;
|
||||
}
|
||||
const script = msg.data.split(' ').slice(1).join(' ');
|
||||
const script = simplified.join(' ');
|
||||
|
||||
// Disallow child_process when shell is disallowed
|
||||
if ((script.indexOf('child_process') !== -1 ||
|
||||
|
@ -67,7 +67,7 @@ class DictionPlugin extends Plugin {
|
||||
pos = '';
|
||||
}
|
||||
|
||||
const word = encodeURIComponent(msg.text.split(' ').slice(pos ? 2 : 1).join(' '));
|
||||
const word = encodeURIComponent(simplified.slice(pos ? 1 : 0).join(' '));
|
||||
|
||||
if (!word) {
|
||||
msg.resolve('Please specifiy a word or term!');
|
||||
@ -111,6 +111,7 @@ class DictionPlugin extends Plugin {
|
||||
msg.resolve(str);
|
||||
return true;
|
||||
},
|
||||
match: /define (\w*)/,
|
||||
aliases: ['df'],
|
||||
description: 'Find definitions for words',
|
||||
usage: '[<pos>] <word>'
|
||||
|
@ -61,7 +61,10 @@ class FunPlugin extends Plugin {
|
||||
name: 'hug',
|
||||
plugin: this.name,
|
||||
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;
|
||||
},
|
||||
hidden: true
|
||||
|
Loading…
Reference in New Issue
Block a user