File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,10 @@ class GHColour(int, enum.Enum):
235235 attention = 0x9A6700
236236 default = 0x1F2328
237237
238+ # These are used by Discord
239+ issue_comment = 0xE68D60
240+ pull_comment = 0xBFE5BF
241+
238242
239243## DEPRECATED
240244# TODO: Will be replaced in favour of application emojis
Original file line number Diff line number Diff line change 2323T = TypeVar ("T" , bound = githubkit .GitHubModel )
2424V = TypeVar ("V" , bound = ghretos .GitHubResource )
2525
26- GITHUB_COLOUR = disnake .Colour (0xFFFFFF )
27-
2826
2927class VisualStyleState (NamedTuple ):
3028 emoji : disnake .Emoji | disnake .PartialEmoji
@@ -395,9 +393,13 @@ def render_ogp(
395393 | ghretos .PullRequestReviewComment
396394 | ghretos .DiscussionComment ,
397395 ) -> disnake .Embed :
396+ if isinstance (obj , githubkit .rest .PullRequestReviewComment ):
397+ colour = constants .GHColour .pull_comment
398+ else :
399+ colour = constants .GHColour .issue_comment
398400 embed = disnake .Embed (
399401 url = obj .html_url ,
400- colour = GITHUB_COLOUR ,
402+ colour = colour ,
401403 description = "" ,
402404 timestamp = obj .created_at ,
403405 )
You can’t perform that action at this time.
0 commit comments