fu.
This commit is contained in:
parent
572cb7a34a
commit
1e918fa7c5
|
@ -28,7 +28,7 @@ export default bot => {
|
||||||
if (typeof output !== undefined && output) {
|
if (typeof output !== undefined && output) {
|
||||||
output = JSON.stringify(output);
|
output = JSON.stringify(output);
|
||||||
if (output.length > maxoutput)
|
if (output.length > maxoutput)
|
||||||
return e.reply(`holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)`);
|
return e.reply(`${e.user.nick}: holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)`);
|
||||||
else {
|
else {
|
||||||
_contexts.set(e.user.prefix, context);
|
_contexts.set(e.user.prefix, context);
|
||||||
let tmp = JSON.stringify(stringify(_contexts.get(e.user.prefix))
|
let tmp = JSON.stringify(stringify(_contexts.get(e.user.prefix))
|
||||||
|
@ -37,13 +37,13 @@ export default bot => {
|
||||||
.split("[native code]").join(""));
|
.split("[native code]").join(""));
|
||||||
sql.any("insert into nxy_users (nick, prefix, sandbox) values (lower($1), $3, $2) on conflict (prefix) do update set sandbox = $2, nick = lower($1)", [
|
sql.any("insert into nxy_users (nick, prefix, sandbox) values (lower($1), $3, $2) on conflict (prefix) do update set sandbox = $2, nick = lower($1)", [
|
||||||
(e.type === "tg" ? e.user.username || e.user.nick : e.user.nick), tmp, e.user.prefix
|
(e.type === "tg" ? e.user.username || e.user.nick : e.user.nick), tmp, e.user.prefix
|
||||||
]).then(() => e.reply(output))
|
]).then(() => e.reply(e.user.nick + ": " + output))
|
||||||
.catch(err => console.log(err));
|
.catch(err => console.log(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
e.reply(err.message.length > maxoutput ? `holy fuck, Error wäre viel zu lang! (${err.message.length} Zeichen :DDDDDD)` : JSON.stringify(err.message));
|
e.reply(e.user.nick + ": " + err.message.length > maxoutput ? `holy fuck, Error wäre viel zu lang! (${err.message.length} Zeichen :DDDDDD)` : JSON.stringify(err.message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
@ -83,7 +83,7 @@ export default bot => {
|
||||||
};
|
};
|
||||||
|
|
||||||
rp(options).then(body => {
|
rp(options).then(body => {
|
||||||
e.reply(body.success ? (body.stdout.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${body.stdout.length} Zeichen :DDDDDD)` : body.stdout) : "error!");
|
e.reply(e.user.nick + ": " + body.success ? (body.stdout.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${body.stdout.length} Zeichen :DDDDDD)` : body.stdout) : "error!");
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
e.reply(err);
|
e.reply(err);
|
||||||
|
@ -97,7 +97,7 @@ export default bot => {
|
||||||
f: e => {
|
f: e => {
|
||||||
let args = e.message.trim().substring(7);
|
let args = e.message.trim().substring(7);
|
||||||
let output = bfgen(args);
|
let output = bfgen(args);
|
||||||
e.reply(output.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)` : output);
|
e.reply(e.user.nick + ": " + output.length > maxoutput ? `holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)` : output);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user