MODiX icon indicating copy to clipboard operation
MODiX copied to clipboard

Add feature to reformat code by reaction

Open sabihoshi opened this issue 6 years ago • 4 comments

I think it'd be a good feature to be able to reformat code easily by placing a certain reaction to it, just as how TL;DR works. Most of the time, users don't un-indent their code.

Before After
public void Foo()
            {
                // Bar
                if(foo) 
                { 
                }
            }
public void Foo()
{
    // Bar
    if(foo) { }
}

sabihoshi avatar Aug 18 '19 10:08 sabihoshi

iirc, roslyn gives the ability to apply formatting changes to code. I'm not sure how effective it will be in this limited context, though

Cisien avatar Aug 18 '19 17:08 Cisien

We removed tl;dr, because it caused issues. It was a bit jarring to people to have their code reuploaded by the bot, and the straw that broke the camel's back was when people would react with tl;dr to Xero's #guild-feed posts.

I would rather not go through that again, so if we were to consider this, it would have to be done with considerable care not to reintroduce the same problems that tl;dr had.

Scott-Caldwell avatar Aug 19 '19 14:08 Scott-Caldwell

Shouldn't this be a feature suggestion to discord rather than MODiX then?

nucombo avatar Oct 25 '19 19:10 nucombo

you're delusional if you think discord's going to implement this. They barely support syntax highlighting!

Cisien avatar Oct 25 '19 21:10 Cisien

As part of a new effort to refocus on priorities, I will close this. If you feel this is imperative to the bot, a new issue can be opened to supersede this.

patrickklaeren avatar Mar 26 '24 14:03 patrickklaeren