Eddiebot: Bot logs `undefined` sometimes

Created on 24 Aug 2020  路  1Comment  路  Source: EddieJaoudeCommunity/EddieBot

image
details parameter can be undefined, we should check if it has a value before logging it.
https://github.com/EddieJaoudeCommunity/EddieBot/blob/f82d0dee089d08b272cc27ecfcbb8dee1abbb544/src/logger.ts#L22

For example:

if (details) {
    await channel.send(`${type.toUpperCase()}: ${message} - ${details}`); 
} else {
    await channel.send(`${type.toUpperCase()}: ${message}`); 
}
bug

Most helpful comment

@alrifay thank you so much for raising this issue! Indeed we should make your suggestion... or you can do it and get green squares for contributing 馃榿 馃煩

>All comments

@alrifay thank you so much for raising this issue! Indeed we should make your suggestion... or you can do it and get green squares for contributing 馃榿 馃煩

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eddiejaoude picture eddiejaoude  路  4Comments

mstanciu552 picture mstanciu552  路  6Comments

Ruth-ikegah picture Ruth-ikegah  路  4Comments

RaisinTen picture RaisinTen  路  3Comments

mikeysan picture mikeysan  路  5Comments