postkrebs :/

This commit is contained in:
Flummi
2017-11-28 16:39:36 +01:00
parent 32b008f1e5
commit 770cf8d233
2 changed files with 15 additions and 8 deletions

View File

@ -4,8 +4,8 @@ let _query_get = `
with ranked_quotes as (
select nick,
item,
rank() over (partition by nick order by id),
count(*) over (partition by nick) as total
rank() over (partition by lower(nick) order by id),
count(*) over (partition by lower(nick)) as total
from nxy_quotes
)
select *
@ -43,6 +43,7 @@ module.exports = bot => {
sql.any(_query_add, [ nick, quote, `${e.network}.${e.channel}`, e.user.nick ])
.then(rows => { })
.catch(err => {
console.log(err);
e.reply("duplicate!");
});
break;