williamhorning / bolt Goto Github PK
View Code? Open in Web Editor NEWa cross-platform chat bot connecting your communities
Home Page: https://williamhorning.dev/bolt
License: MIT License
a cross-platform chat bot connecting your communities
Home Page: https://williamhorning.dev/bolt
License: MIT License
# to matrix
in principle embeds is just converting to some html that looks similar. for allowed tags see https://spec.matrix.org/v1.10/client-server-api/#mroommessage-msgtypes
attachments would be more complicated since it requires uploading first, then attaching the mxc to the message. for custom emotes it'd also need to work the same way, but you'll need to use some db to store emoji-to-mxc mappings.
html? good luck converting that
images? use the download url on the homeserver
Originally posted by @austinhuang0131 in #46 (comment)
bolt-discord fails to connect to discord, throwing an uncaught error. Looking at the part of WebSocketShard#onClose
mentioned in the stack trace12, it appears that bolt-discord is requesting disallowed intents when connecting to Discord. These aren't the same set of intents that we've used on djs13 but they still cover a lot more stuff than they should. Prod bot requests all of the privileged intents and that includes stuff that it shouldn't. Taking a look at the Discord API docs, it seems we only need to request the Guilds, GuildMessages, and MessageContent intents
bolt-bolt-1 | error: Uncaught (in promise) Error: Unhandled 'error' event emitted, received [object Object]
bolt-bolt-1 | at WebSocketManager.emit (file:///deno-dir/npm/registry.npmjs.org/@vladfrangu/async_event_emitter/2.2.2/dist/index.mjs:250:19)
bolt-bolt-1 | at WebSocketShard.<anonymous> (file:///deno-dir/npm/registry.npmjs.org/@discordjs/ws/1.0.0/dist/index.mjs:1136:51)
bolt-bolt-1 | at WebSocketShard.emit (file:///deno-dir/npm/registry.npmjs.org/@vladfrangu/async_event_emitter/2.2.2/dist/index.mjs:267:37)
bolt-bolt-1 | at WebSocketShard.onClose (file:///deno-dir/npm/registry.npmjs.org/@discordjs/ws/1.0.0/dist/index.mjs:1094:14)
bolt-bolt-1 | at WebSocket.connection.onclose (file:///deno-dir/npm/registry.npmjs.org/@discordjs/ws/1.0.0/dist/index.mjs:639:17)
bolt-bolt-1 | at callListener (file:///deno-dir/npm/registry.npmjs.org/ws/8.13.0/lib/event-target.js:290:14)
bolt-bolt-1 | at WebSocket.onClose (file:///deno-dir/npm/registry.npmjs.org/ws/8.13.0/lib/event-target.js:220:9)
bolt-bolt-1 | at WebSocket.emit (ext:deno_node/_events.mjs:382:28)
bolt-bolt-1 | at WebSocket.emitClose (file:///deno-dir/npm/registry.npmjs.org/ws/8.13.0/lib/websocket.js:258:10)
bolt-bolt-1 | at Socket.socketOnClose (file:///deno-dir/npm/registry.npmjs.org/ws/8.13.0/lib/websocket.js:1264:15)
https://cdn.jsdelivr.net/npm/@discordjs/[email protected]/dist/index.mjs at line 1093 ↩
While the error is annoying to read, that's out of scope for this issue and should be filed against djs ↩
The opposite (guilded into discord) does work though.
--dry-run
)why am I doing this
For some reason, the bot goes offline for a brief period after I try !bolt help
, almost as if it's crashing.
I do not know what is causing this issue, but I haven't been able to get another bot to work either.
Per topic.
In Bolt 0.5.2, we'll introduce migration code for embed bridges in bolt-guilded, and then we'll remove them in 1.0.0. If anyone sees this in a message sent by Bolt, they should give the bot permission to create webhooks and run !bolt resetbridge
to switch the bridge over to webhooks.
at some point we should move everything that isn't core
outside of this repo and into separate repos. this would make maintaining plugins with separate versioning a lot easier and would make it easier for others to contribute
tracking issue for regressions introduced in 0.4.13
Title pretty much says it all
Hello, we use revolt, and matrix left discord 2 months a go, will be nice to have this also connect a matrix room with a revolt room, I was going to write the bot myself in go or rust but then I saw this, so why reinvent the wheel.
known issue, should be fixed after 0.5.5 is out and stable
would be nice, could also speed up a bunch of stuff such as checking if something is bridged
this would be breaking and require migrations
see https://redis.io/docs/data-types/json and https://github.com/iuioiua/r2d2
when execute node scripts/cli.js registerSlashCommands :
node:internal/modules/cjs/loader:1093
throw err;
^
Error: Cannot find module '/root/bolt/scripts/cli.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
at Module._load (node:internal/modules/cjs/loader:934:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v19.9.0
Should be possible to just change 75 of guilded.js that replaces all invalid characters with some other character or use their actual username, like william horning#0577
(Discord), william horning
(Guilded), or @williamhorning
(Revolt)
Line 75 in 478a804
Messages sent in Discord channels bolt can't see don't get sent to Guilded
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.