Skip to main content
100%

send commands to a Mozilla Hubs bot via chat

✓ Published0🌍 Public
UUtopiah
Last edited Apr 2, 2020
Created on Apr 2, 2020

A Mozilla Hubs bot listens to chat messages and triggers actions when a user types a command. The example shows a "save" command that calls `pimvrSaveRemote("HubsTest", "testFromImportToolLibTris")` to save data. The bot runs in the browser and uses the `hubs_bot_command_via_chat.js` script, which loads the Mozilla Hubs library from `https://mozilla-hubs-lib.glitch.me/client.js`. It polls the chat log every 500 milliseconds by selecting `.Linkify` elements, reads the latest message and its author, and avoids repeating commands. The animation renders the bot's behavior in real time within the Hubs client.

AI-generated description

Similar vizzes