This commit is contained in:
Flummi
2017-11-26 17:13:57 +01:00
parent 4af52d6609
commit ddd1530c8e
2 changed files with 10 additions and 7 deletions

View File

@ -37,7 +37,11 @@ module.exports = bot => {
return e.reply(`holy fuck, Ausgabe wäre viel zu lang! (${output.length} Zeichen :DDDDDD)`);
else {
_contexts.set(`${e.network}.${e.channel}.${e.user.nick}`, context);
sql.exec("update `useless` set `data` = ? where `trigger` = 'sandbox_js';", JSON.stringify(stringify([..._contexts]).replace(/\n/g, "").replace(/\t/g, "")))
let tmp = JSON.stringify(stringify([..._contexts])
.replace(/\n/g, "")
.replace(/\t/g, "")
.split("[native code]").join(""));
sql.exec("update `useless` set `data` = ? where `trigger` = 'sandbox_js';", tmp)
.then(() => {
e.reply(output);
})