1616from yarl import URL
1717
1818from ghutils .core .bot import GHUtilsBot
19+ from ghutils .core .types import CustomEmoji
1920from ghutils .ui .components .visibility import add_visibility_buttons
2021from ghutils .utils .discord .commands import AnyInteractionCommand
2122from ghutils .utils .discord .components import update_select_menu_default
@@ -35,6 +36,7 @@ class ArtifactContainer(Container[Any]):
3536
3637 def set_artifact (
3738 self ,
39+ bot : GHUtilsBot ,
3840 repo : FullRepository ,
3941 branch : str | None ,
4042 workflow : Workflow ,
@@ -95,6 +97,7 @@ def set_artifact(
9597 if branch and is_normal :
9698 self .button_row .add_item (
9799 Button (
100+ emoji = bot .get_custom_emoji (CustomEmoji .nightly_link ),
98101 label = "nightly.link" ,
99102 url = str (
100103 URL ("https://nightly.link" )
@@ -118,6 +121,7 @@ class SelectArtifactView(LayoutView):
118121 def __init__ (
119122 self ,
120123 * ,
124+ bot : GHUtilsBot ,
121125 github : GitHub [Any ],
122126 command : AnyInteractionCommand ,
123127 repo : FullRepository ,
@@ -126,6 +130,7 @@ def __init__(
126130 ):
127131 super ().__init__ (timeout = 5 * 60 )
128132
133+ self .bot = bot
129134 self .github = github
130135 self .command = command
131136 self .repo = repo
@@ -179,7 +184,7 @@ async def new(cls, interaction: Interaction, repo: FullRepository) -> Self:
179184 )
180185
181186 return cls (
182- # this is *probably* fine?
187+ bot = GHUtilsBot . of ( interaction ),
183188 github = github ,
184189 command = interaction .command ,
185190 repo = repo ,
@@ -286,6 +291,7 @@ def set_artifact(self, artifact_name: str) -> bool:
286291
287292 assert self .workflow and self .workflow_run
288293 self .result_container .set_artifact (
294+ self .bot ,
289295 self .repo ,
290296 self .branch ,
291297 self .workflow ,
0 commit comments