const { Webhook } = require('discord-webhook-node'); const { Builder, Browser, By } = require('selenium-webdriver'); const firefox = require('selenium-webdriver/firefox'); const discordHook = new Webhook("https://discord.com/api/webhooks/1328616300544786444/oCwaJ1HQW_Hk0_BQB6lWfuLSikhGOzEJqaOr37MNb6lkICk0Bllk7izVPdmXHKm1JhAN"); module.exports = class tools { constructor() { this.availableFunctions = { sendMessage: this.sendMessage, }; const toolFunction = this.availableFunctions["sendMessage"]; toolFunction({ target: "TEST", message: "message" }); } processToolCall(toolCalls, messages) { } sendMessage(args) { try { discordHook.setUsername(args.target.toString().replace("discord", "").replace("Discord", "")); discordHook.send(args.message.toString()); } catch (error) { console.log(error); } return "Message: " + args.message + ", successfully send to " + args.target; } }