Skip to content

Commit

Permalink
👗More renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Aluerie committed Mar 10, 2025
1 parent 43c916c commit bce3f6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(

self.exc_manager = ExceptionManager(self)

self.aluerie_online: bool = False
self.irene_online: bool = False

# def show_oauth(self) -> None:
# oauth = twitchio.authentication.OAuth(
Expand Down Expand Up @@ -182,9 +182,9 @@ async def setup_hook(self) -> None:
5. Comment the lines back. In normal state, they should be commented.
"""
self.print_bot_oauth() # noqa: ERA001, RUF100
self.print_broadcaster_oauth() # noqa: ERA001, RUF100
return # noqa: ERA001, RUF100
# self.print_bot_oauth() # noqa: ERA001, RUF100
# self.print_broadcaster_oauth() # noqa: ERA001, RUF100
# return # noqa: ERA001, RUF100

for ext in self.extensions:
(await self.load_module(ext))
Expand Down Expand Up @@ -418,18 +418,18 @@ async def check_if_online(self) -> None:
"""Check if aluerie is online - used to make my own (proper) online event instead of twitchio's."""
await asyncio.sleep(1.0) # just in case;
if await self.aluerie_stream():
self.aluerie_online = True
self.irene_online = True
self.dispatch("aluerie_online")

async def event_stream_online(self, _: twitchio.StreamOnline) -> None:
"""Instead of the twitchio event - dispatch my own online event.
The difference is that my event accounts for the state of my stream when the bot restarts.
"""
self.aluerie_online = True
self.irene_online = True
self.dispatch("aluerie_online")

async def event_stream_offline(self, _: twitchio.StreamOffline) -> None:
"""Instead of the twitchio event - dispatch my own offline event."""
self.aluerie_online = False
self.irene_online = False
self.dispatch("aluerie_offline")
4 changes: 2 additions & 2 deletions ext/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ async def online(self, ctx: commands.Context) -> None:
* If somehow eventsub missed stream_online notification - this can "manually"
fix the problem of soft-locking the commands.
"""
self.bot.aluerie_online = True
self.bot.irene_online = True
await ctx.send(f"I'll treat {ctx.broadcaster.display_name} as online now {const.STV.dankHey}")

@commands.is_owner()
@commands.command()
async def offline(self, ctx: commands.Context) -> None:
"""Make the bot treat streamer as offline."""
self.bot.aluerie_online = False
self.bot.irene_online = False
await ctx.send(f"I'll treat {ctx.broadcaster.display_name} as offline now {const.STV.donkSad}")


Expand Down

0 comments on commit bce3f6f

Please sign in to comment.