Commands to enter code in specific language (/js, /python, etc)


댓글 7개

  • Septies

    Might be tedious but it also helps the formatter know when to stop code formatting. With your proposed suggestion it'd be an interesting problem to solve: when does something go from being JavaScript to being normal text explaining what you just posted?

  • mindrones

    It'd be all javascript by definition, using the /js command you declared the intent of writing in a specific language.

  • JKybett

    Personally, I would hate this. "/" is fairly common as the start of bot commands, and I wouldn't want to suddenly be unable to communicate with a bot because Discord started assuming anything starting with a slash was me starting a code block.
    Triple-backticks is simple enough that I've never once thought it was tedious, but still specific enough that I've never had to worry about doing it unintentionally.
    If you really want this, you could just write a bot that recognises "/js" as a command to copy your message, wrap it in triple-backticks and repost it.

  • ChuckLennon

    to close said tag, you could just do as follow :
    [code as much as you like]


    /js>. or some tag that just replicates the starting one.

  • john cena

    If you want to set a specific language for your code block, type the three apostrophes, type in the code language (e.g., css ) on the first line, create a new line, and add the rest of your code before typing the closing three apostrophes.There are different ways to write my essay add comments in different programming languages. Example: If we are coding in the C# programming language, in order to add a single-line comment, we need to add a comment using the “//” symbol. In order to add a multi-line comment, we need to add a comment using the “/* */” symbol.

  • worldasiamp

    I extremely upbeat discovered this site in the long run. Extremely enlightening and out of commission, Thanks for the post and


  • Mandana

    Integrating a feature like "/js" for code snippets with automatic syntax highlighting would indeed streamline the process, enhancing user experience by reducing the manual effort required for formatting. By simply typing "/js" followed by the code snippet, users can conveniently share JavaScript code with proper syntax highlighting, thereby improving readability and comprehension. This implementation could significantly enhance the efficiency of sharing code on forums, making it more accessible and user-friendly for developers and enthusiasts alike. Such a feature could foster a more seamless and enjoyable interaction within coding communities, ultimately facilitating smoother knowledge exchange and collaboration.


댓글을 남기려면 로그인하세요.