tmp commit

This commit is contained in:
Flummi
2018-03-13 10:55:01 +01:00
parent 7e704f9dc2
commit b62a4c081c
4 changed files with 44 additions and 13 deletions

View File

@@ -204,7 +204,8 @@ export default bot => {
if(e.args.length > 0 && e.args[0].charAt(0) === "=") {
let tmp = e.args[0].slice(1);
sql.any(
`insert into nxy_users (nick, ${mode}) values (lower($1), $2) on conflict (nick) do update set ${mode} = excluded.${mode}`, [
`insert into nxy_users (prefix, nick, ${mode}) values ($1, lower($2), $3) on conflict (prefix) do update set ${mode} = excluded.${mode}, nick = $2`, [
e.user.prefix,
(e.type === "tg"?e.user.username || e.user.nick:e.user.nick),
tmp
])