Adding chatid to Logging output
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm 2020-09-26 09:29:11 +00:00
parent 50006cb799
commit 56df25390c

View File

@ -166,9 +166,9 @@ bot.command("list", async (ctx) => {
bot.on("message", async ctx => { bot.on("message", async ctx => {
const chatid = ctx.chat.id; const chatid = ctx.chat.id;
Logging.debug("Message From:", chatid, ctx.message);
const urls = ctx.message.entities.filter(e => e.type === "url").map(e => ctx.message.text.substr(e.offset, e.length)); const urls = ctx.message.entities.filter(e => e.type === "url").map(e => ctx.message.text.substr(e.offset, e.length));
Logging.debug(ctx.message);
await Promise.all(urls.map(async url => { await Promise.all(urls.map(async url => {
Database.addSubscriber(url, chatid); Database.addSubscriber(url, chatid);
await ctx.reply("Subscribed to: " + url); await ctx.reply("Subscribed to: " + url);