I have a chrome extension that uses console.log redirect into a div element when specific events happen. I have created a small Discord bot also (no functions or such, I just created and added it to my Discord channel)
Now instead of using console.log inside that div, I would rather want to send this information, to my bot and the bot should forward the message to a specific user.
Is that possible and if so, how?
Code for DC bot:
const discord = require('discord.js');
const slash = require('slash_commands.js');
const bot = new discord.Client({ intents: [discord.Intents.FLAGS.GUILDS, discord.Intents.FLAGS.GUILD_MESSAGES] });
bot.login('xxx');
bot.on('ready', () => {
console.log('Bot started');
});
So the bot is started and joined my Discord server. So maybe lets assume that this is the current situation:
Lets say my chrome extension is scanning for a website that contains prices. Instead of letting the chrome extension log the results to that div element, I would like to let the chrome extension send a command/message to my Discrod bot and then he will forward this inforamtion with a private message to a specific user.
Anyone had the same situation and could help me out how the code would have to like for this process? I was trying to figure it out myself for 4 days now.