Adding some more console noise for debugging
This commit is contained in:
parent
7c6389d421
commit
4a3e470945
@ -126,8 +126,10 @@ async function registerChannel(channel_snowflake, server_snowflake, channel_name
|
|||||||
async function registerChannelIfMissing(channel_snowflake, server_snowflake, channel_name) {
|
async function registerChannelIfMissing(channel_snowflake, server_snowflake, channel_name) {
|
||||||
return connection_pool.query("SELECT * FROM channels WHERE channel_snowflake = ?;", [channel_snowflake]).then(async ([rows, fields]) => {
|
return connection_pool.query("SELECT * FROM channels WHERE channel_snowflake = ?;", [channel_snowflake]).then(async ([rows, fields]) => {
|
||||||
if (rows) {
|
if (rows) {
|
||||||
|
console.log("Channel Already Registered")
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
console.log("Channel Not Registered, registering")
|
||||||
return await connection_pool.query("INSERT INTO channels VALUES (?, ?, ?)", [channel_snowflake, server_snowflake, channel_name]).then((rows, fields) => {
|
return await connection_pool.query("INSERT INTO channels VALUES (?, ?, ?)", [channel_snowflake, server_snowflake, channel_name]).then((rows, fields) => {
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user