ginjaninja32 / disgoirc Goto Github PK
View Code? Open in Web Editor NEWDiscord<->IRC bridge bot, written in Go
License: GNU Affero General Public License v3.0
Discord<->IRC bridge bot, written in Go
License: GNU Affero General Public License v3.0
Messages that are longer than the IRC character limits cut. Completely losing part of the message. This seems to be the issue mostly in the staff channel, or with long posts that are a large single paragraph instead of being broken up.
An example:
(01:44:56) DiscordBridge: <Snapshot> @community Moderators please be careful that you don't accidentally kick any discord bots. It looks like someone with kick permissions did so and as a result we didn't have the bridge working for a good little while. They're a bit annoying to get back added onto the server. If you do accidentally kick it, just let myself or apples know so we can get it back on server quickly. While obviously having it be kicked is bad, it's
That's all of the message that got to IRC.
testing testing 1 2 3
How to reproduce
Write a multiline Discord message and send it.
What happened
Only the first line get sent to IRC.
What I expected to happen
For the entire message to get through, tho not necessarily with all formatting intact.
**foo**
on Discord should convert to ^Bfoo^B
on IRC.
Perhaps
{
"Guild Name": {
"#mychannel": "#general",
"#otherchannel": "#other"
},
"Other Guild": {
"#otherdiscord": "#general"
}
}
I would like to see who is creeping on the #bs12dnd channel through Discord and also kick people in #bs12 that are spammy
If you do /me on IRC it comes out as _this_
auto-reconnect when irc or discord connection died
Should be a warning
Greetings,
After the paste feature was added, my bot started crashing on line 309 of discord.go
. This was caused by my configuration file not having the new "max_lines"
item, and as a result, dispatchMessageToIRC trying to iterate over a slice length of -1 (set on line 304).
Fixing this was simple enough, just adding the appropriate line to the config.
However, I see this becoming more of an issue as the bot grows and gets new features. It won't be an issue for new users since they'll just copy the example config as instructed, but it's a bit dicier if you're an old user and upgrade.
I wanted to get your thoughts before possibly writing some code and a PR. There are a few answers to this:
Crash the bot, directly tell the user that they need to add the missing item
➕ Probably the most comprehensive way
➖ Labor and code intensive, will be ugly validating every config section
Crash the bot, by checking for a "configVersion" int be less than the current version number kept in the code, which will be bumped every time new directives or structural changes are introduced to config.json
➕ Only need to check a single json on startup
➖ Requires that the example config and the hardcoded "current config version" be kept religiously up to date
Initialize all config variables to sane defaults at the code level
➕ We don't have to crash the bot, will makes upgrades smooth
➖ A bit magic and un-go-like, might cause unintended behavior
What do you think?
**foo**
on IRC should convert to \*\*foo\*\*
on Discord.
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.