Giter Club home page Giter Club logo

disgoirc's People

Contributors

basisbit avatar ginjaninja32 avatar karunamon avatar psiomegadelta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

disgoirc's Issues

Discord to IRC: Long messages are cutting

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.

Multiline Discord messages are truncated

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.

Improve mapping definition format

Perhaps

{
    "Guild Name": {
        "#mychannel": "#general",
        "#otherchannel": "#other"
    },
    "Other Guild": {
        "#otherdiscord": "#general"
    }
}

Handling config file changes across versions

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:

  1. 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

  2. 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

  3. 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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.