Skip to content

Commit 0e8e839

Browse files
committed
add streaming activity support
1 parent 852dee6 commit 0e8e839

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tux/main.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,22 @@ async def console(self) -> None:
155155
if command == "setstatus":
156156
# query the user for the status type and status message
157157
status_type = await asyncio.get_event_loop().run_in_executor(
158-
pool, input, "Status type (watching, listening, playing): "
158+
pool, input, "Status type (watching, listening, playing, streaming): "
159159
)
160+
160161
status_message = await asyncio.get_event_loop().run_in_executor(
161162
pool, input, "Status message: "
162163
)
163164

165+
if status_type == "streaming":
166+
stream_url = await asyncio.get_event_loop().run_in_executor(
167+
pool, input, "Stream URL: "
168+
)
169+
await self.change_presence(
170+
activity=discord.Streaming(name=status_message, url=stream_url)
171+
)
172+
continue
173+
164174
# set the bot's status
165175
await self.change_presence(
166176
activity=discord.Activity(

0 commit comments

Comments
 (0)