A bot command to embed/share specific lines of code from Github.
Justification
It will be very easy to share code snippets and I think its nice to have code snippets around while explaining code to someone. Besides when asking for help in help channels, if you have your code somewhere say Github, then a single command can negate the need of copy pasting the code and the need of checking if the code you are pasting too long ๐ .
Implementation
For example, to get a code snippet from this Github repository, from this file, containing lines from line 10 to line 14:
May also include support for sharing code snippets from other Github like services and also maybe from hastebin (as generally large files are shared via hastebin, so it would be helpful when discussing about particular lines of code).
Some example commands for different cases to explain further:
P.S. I'm a beginner and have joined the community very recently, so I don't know if this feature already exists. Also, if this feature is to be added ๐ , a proper tag, and suitable format for arguments (unlike mentioned above, which seems to over-complicate things) would be very nice and convenient to use.
What?
A bot command to embed/share specific lines of code from Github.
Justification
It will be very easy to share code snippets and I think its nice to have code snippets around while explaining code to someone. Besides when asking for help in help channels, if you have your code somewhere say Github, then a single command can negate the need of copy pasting the code and the need of checking if the code you are pasting too long ๐ .
Implementation
For example, to get a code snippet from this Github repository, from this file, containing lines from line 10 to line 14:
(or maybe include complete http link)
returns: @.discord_user Your requested code snippet from https://github.com/python-discord/cj8-qualifier/blob/master/qualifier/test_qualifier.py#L10-L14 is here:
May also include support for sharing code snippets from other Github like services and also maybe from hastebin (as generally large files are shared via hastebin, so it would be helpful when discussing about particular lines of code).
Some example commands for different cases to explain further:
From a hastebin https://paste.pythondiscord.com/ezapimofef.py:
(or maybe include complete http link)
P.S. I'm a beginner and have joined the community very recently, so I don't know if this feature already exists. Also, if this feature is to be added ๐ , a proper tag, and suitable format for arguments (unlike mentioned above, which seems to over-complicate things) would be very nice and convenient to use.