add youtube new video notify
This commit is contained in:
@@ -404,7 +404,9 @@ const addYoutube = async (txt = '', source = {}, db) => {
|
||||
return { reply }
|
||||
}
|
||||
|
||||
console.log('youtube id ::: ', id)
|
||||
let youtubeName = await api.google.queryYoutubeName(id)
|
||||
console.log('youtubr name :::: ', youtubeName)
|
||||
if (youtubeName === null) return null
|
||||
|
||||
text = `select "id" from "public"."youtube_channel" where "id" = $1`
|
||||
@@ -436,7 +438,9 @@ const addYoutube = async (txt = '', source = {}, db) => {
|
||||
|
||||
try {
|
||||
await api.google.subYoutube(id)
|
||||
} catch (err) {}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
|
||||
return {
|
||||
reply: 'add youtube channel success'
|
||||
|
||||
@@ -27,7 +27,7 @@ const runAct = async (cmd, txt = '', source = {}) => {
|
||||
if (!cmd || typeof cmd !== 'string' || cmd.length === 0) return null
|
||||
if (!(cmd in cmds)) return null
|
||||
let result = await cmds[cmd](txt, source)
|
||||
return result
|
||||
return result.reply
|
||||
}
|
||||
|
||||
module.exports = runAct
|
||||
|
||||
Reference in New Issue
Block a user