Right now, the language is being parsed from a codeblock.
That's leftover from the pre-slash command era, and now that multiple options exist, we should make use of that by adding an option to specify the language of the pasted code.
Additionally, since slash commands only allow one-line freeform inputs, we should consider switching to modals.
They allow a length of up to 4000 characters with the paragraph text input style which should be sufficient for most code.
See https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles