Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate code-blocks for Github gist links in chat #60

Open
jasonlessenich opened this issue Aug 24, 2021 · 2 comments
Open
Labels
beginner task For issues that are well-suited to beginners. new feature

Comments

@jasonlessenich
Copy link
Member

Description
Allow inlining of code blocks from GitHub links that have highlighted lines.

Example

Dioxin says:
Check this out:
https://gist.github.com/discorddioxin/27a33cf1376847f4ada29d61390c5198#file-main-java-L13-L16

Bot says:

        box.getItems().add(new Student("First", 111, 3));
        box.getItems().add(new Student("Second", 222, 4));
        box.getSelectionModel().select(0);

https://canary.discord.com/channels/648956210850299986/752535909228085348/867505817506414593

@jasonlessenich jasonlessenich added the enhancement Improvement of an already existing feature label Aug 24, 2021
@jasonlessenich jasonlessenich self-assigned this Aug 24, 2021
@jasonlessenich jasonlessenich pinned this issue Aug 24, 2021
@jasonlessenich jasonlessenich removed their assignment Sep 5, 2021
@andrewlalis andrewlalis changed the title Dioxin#9863's Suggestion Automatically generate code-blocks for Github gist links in chat Oct 5, 2021
@andrewlalis andrewlalis added the beginner task For issues that are well-suited to beginners. label Oct 6, 2021
Kemikals added a commit to Kemikals/JavaBot that referenced this issue Oct 10, 2021
…s not work yet if a specific file in a multifile gist is given.
@Kemikals
Copy link
Contributor

Have been working on this and I have an idea in mind just want to run it by everyone before I polish it up. So gists can hold multiple files. A Gist link can be a link to a whole gist or a file in the gist or even a commit in a gist. My idea for this implementation is to have the bot send the code block and add a forwards and backwards reaction to the message allowing them to navigate the gist and the message be updated.

@andrewlalis
Copy link
Contributor

That sounds good, as long as it is relatively simple to keep track of the state without needing to use a database for a relatively minor feature.

@MoonTM-GIT MoonTM-GIT added new feature and removed enhancement Improvement of an already existing feature labels Dec 1, 2021
@jasonlessenich jasonlessenich unpinned this issue Dec 2, 2021
@jasonlessenich jasonlessenich moved this to To-Do in JavaBot Feb 14, 2022
@jasonlessenich jasonlessenich moved this from To-Do to To-Do: Accepted Suggestion in JavaBot Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner task For issues that are well-suited to beginners. new feature
Projects
Status: To-Do: Accepted Suggestion
Development

No branches or pull requests

4 participants