Add some debug logs

This commit is contained in:
Christopher Cookman 2023-03-10 10:57:40 -07:00
parent 34ae082235
commit 32ece5f64d
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -149,6 +149,7 @@ client.on('messageCreate', async (message) => {
output = data.data.choices[0].message; output = data.data.choices[0].message;
output.name = "Bot"; output.name = "Bot";
if (output.content.endsWith("!!!TERM1234!!!")) { // This can allow a self-termination command if (output.content.endsWith("!!!TERM1234!!!")) { // This can allow a self-termination command
console.log(`${colors.cyan("[INFO]")} Self termination command detected in ${colors.green(message.channel.name)} (${colors.green(message.channelId)}): ${colors.green(message.content)}`)
output.content = output.content.replace("!!!TERM1234!!!", ""); output.content = output.content.replace("!!!TERM1234!!!", "");
clearInterval(typing); clearInterval(typing);
if (output.content.length != 0) message.channel.send(output.content); if (output.content.length != 0) message.channel.send(output.content);