LLR Stream Admin Module

class StreamAdminCMD(*args: Any, **kwargs: Any)

Bases: Cog

Module specifically designed to meet the evergrowing needs of LLR Stream Management.

See also

Module is locked to the Love Live Radio (LLR) server.

Attention

All commands assume minimum bot permissions: View Channel, Send Messages.

async start_supply_drop(ctx)

Manually starts the supply drop task.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async stop_supply_drop(ctx)

Manually stops the supply drop task.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async start_quiz(ctx)

Manually starts the quiz task.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async stop_quiz(ctx)

Manually stops the quiz task.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async luckychii(ctx, message_id: int = None, forced=True)

Command !!luckychii.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async luckychiicounter(ctx, iterations: int)

Command !!luckychiicounter.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async reqs(ctx, option=None, bot=False)

Check or change the status for listeners to make LLR Requests during stream.

Syntax:

!!reqs [option]

Example:

!!reqs
!!reqs on
!!reqs off
Parameters:

option (str, optional) – The desired status for requests (on or off). If left blank, the current status is checked.

Returns:

Sends an embed message displaying the current or updated status of requests.

Return type:

discord.Embed

Permissions

Author: LLR, LLR Admin

Bot: Manage Messages

async llr_schedule(ctx, time=None, date=None)

Check or update the LLR schedule. The secondary schedule is automatically calculated off of this time. Will also update the database with early or late stream params.

Syntax:

!!llr_schedule [time] [date]

Example:

!!llr_schedule 19:00
!!llr_schedule 19:00 2023-07-16
Parameters:
  • time (str, optional) – The time to schedule the next stream in HH:MM format. If not provided, the schedule is checked.

  • date (str, optional) – The date to schedule the next stream in YYYY-MM-DD format. If not provided, the current date is used.

Returns:

Sends a message displaying the updated schedule or the current schedule if no time is provided, updates embed in #llr-schedule. Runs automatically from thanks.

Return type:

discord.Message, discord.Embed

Permissions

Author: LLR, LLR Admin

async next_schedule(ctx, option)

Manually trigger the next schedule update for LLR Schedule.

Syntax:

!!next_schedule <option>

Example:

!!next_schedule early
Parameters:

option (str, required) – The time option for the next schedule update. Use “early” for 13:00 or late for 20:00.

Returns:

The Unix timestamp for the next scheduled update.

Return type:

int

Permissions

Author: LLR, LLR Admin

async get_lfu(ctx)

Return the current Featured User.

Syntax:

!!get_lfu
Returns:

Sends a message with the name and ID of the current Featured User.

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async set_lfu(ctx, id: int)

Manually overwrite the current Featured User.

Syntax:

!!set_lfu <id>

Example:

!!set_lfu 123456789012345678
Parameters:

id (int, required) – The ID of the new Featured User.

Returns:

Sends a message confirming the update of the Featured User.

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async raffle(ctx, winners: int = 1, role: Role = None)

Decides the winner of the Featured User raffle.

Syntax:

!!raffle <winners> [role]

Example:

!!raffle
!!raffle 1
!!raffle 2 @entry
Parameters:
  • winners (int, optional) – The number of winners to select. Defaults to 1.

  • role (discord.Role, optional) – The role of the participants. Defaults to ‘@entry’ if not specified.

Returns:

Sends a message announcing the winner(s) of the raffle and updates the last featured user.

Return type:

discord.Embed

Returns:

Direct messages the winner with other details pending users privacy settings.

Return type:

discord.DMChannel, discord.Message

Permissions

Author: LLR, LLR Admin

async raffleimageload(ctx)

Push the current Featured User’s profile picture to OBS via #chiidata (FEATUREDUSER[stream] userId <avatarUrl> displayName → Manmaru overwrites featured_user.gif / featured_user_name.txt). Does not run a new raffle or change last_featured_user.

Syntax:

!!raffleimageload

Permissions

Author: LLR Admin

async rafflemessageload(ctx, *, message: str | None = None)

Push a Featured User message to OBS via #chiidata (FEATUREDMESSAGE[stream] text → Manmaru overwrites featured_user_message.txt).

With no args: uses last_featured_user_message from data.json (set by !!setmsg); if missing, falls back to the newest FEATUREDMESSAGE in #chiidata.

With text after the command: sends that text instead (for testing / overrides).

Syntax:

!!rafflemessageload
!!rafflemessageload Hello world — testing, punctuation OK!

Permissions

Author: LLR Admin

async choose(ctx, *choices: str)

Decides the winner of Featured Idol if there is a tie.

Syntax:

!!choose <choices>

Example:

!!choose Kotori Honoka Umi
Parameters:

choices (str, required) – The list of tied idols to choose from.

Returns:

Sends an embed message announcing the randomly chosen winner among the tied idols.

Return type:

discord.Embed

Permissions

Author: LLR, LLR Admin

async starttwitch(ctx)

Manually set Chisato’s activity to Streaming Love Live Radio.

Syntax:

!!starttwitch
Returns:

Sends a message confirming the presence change to streaming Love Live Radio.

Return type:

discord.Message

Returns:

Update activity to Streaming Love Live Radio with Twitch link

Return type:

discord.Activity

Permissions

Author: LLR, LLR Admin

async stoptwitch(ctx)

Manually revert Chisato’s activity to default rotation.

Syntax:

!!stoptwitch
Returns:

Sends a message confirming the presence change to default rotation.

Return type:

discord.Message

Returns:

Update activity to default rotation.

Return type:

discord.Activity

Permissions

Author: LLR, LLR Admin

async set_delay(ctx, time_input: str | None = None)

Delay stream end by a specified amount of time. If enabled, the LLR stream in progress will not be able to end before this time has expired.

Aliases: delay

Parameters:

time_input (Optional[str], optional) – The delay time in the format ‘XhYm’ (e.g., ‘1h30m’ or ‘5m’). If None, displays the current delay time.

Syntax:

!!set_delay [time_input]

Example:

!!set_delay 1h30m

!!set_delay
Returns:

Sends a message displaying the current delay time or confirming the updated delay time.

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async devquiz(ctx)

Manually trigger a stream quiz for testing purposes during devstaato.

Permissions

Author: LLR Admin (server owner / bot owner); Love Live Radio guild

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async devstaato(ctx, minutes: int = 10, mode: str | None = None)

Put Staato into debug mode for a specified number of minutes.

Syntax:

!!devstaato [minutes] [mode]

Example:

!!devstaato
!!devstaato 5
!!devstaato 20
!!devstaato 20 min
Parameters:
  • minutes (int, optional) – The duration in minutes for debug mode. Defaults to 10 minutes.

  • mode (str, optional) – Optional mode flag. Use min (or minimal/stripped) to run a stripped-down dev stream.

Returns:

Confirmation message.

Return type:

discord.Message

Permissions

Author: LLR Admin

async staato(ctx, duration: int = None)

Starts the LLR Stream, begins timer for auto messages during stream. Updates Chii-chans activty, enables all stream-related commands, calculates lucky chii-bun probabilities.

Automatically ends the stream 4hrs after command is executed unless set_delay is used during stream.

Note: Staato runs as a background task and can be stopped with !!endstaato if needed.

Aliases:

stato, stattto, staatto

Syntax:

!!staato [duration]

Parameters:

duration (Optional[int])

Custom stream duration in minutes. If provided, the stream will run for this duration but calculations will be based on a 4-hour stream (simulating a late start). For example, !!staato 180 will run a 3-hour stream starting as if 1 hour has already passed.

Returns:

Sends hourly embed messages detailing the start, progress, and end of the LLR stream.

Return type:

discord.Embed

Permissions

Author: LLR, LLR Admin

Debug

If in debug mode, debug information will be displayed and a simulated live-stream enabled environment will be created.

async win(ctx, idol)

Announces the winner of the Featured Idol poll for the current LLR stream. Updates records such as the last Featured Idol, sets the server icon to the winning idol’s icon, records updated LFI and LFU, and moves voting records accordingly.

Syntax:

!!win <idol>

Example:

!!win dia
Parameters:

idol (str, required) – The name of the idol who won the Featured Idol poll.

Returns:

Sends an embed message announcing the Featured Idol winner and updates various data records.

Return type:

discord.Embed

Permissions

Author: LLR Admin

async nrs(ctx)

Begins the auto message for the NRS Sequence, sends a series of animated GIFs in sequence, each depicting a different phase of the NRS Sequence. Outdated after autostream implementation.

Syntax:

!!nrs
Returns:

Multiple timed messages displays GIFs

Return type:

discord.Message

Permissions

Author: LLR Admin

Bot: Embed Links

async thanks(ctx: Context, idol, img: Attachment)

Send a thank you message at the end of the stream, announcing the Featured Idol winner and thanking supporters.

Syntax:

!!thanks <idol> <image attachment>

Example:

!!thanks Hanamaru <image attachment>
Parameters:

idol (str, required) – The name of the winning idol.

Returns:

Sends a formatted thank you message to the announcements channel.

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async updateidolstamina(ctx, name: str, date: str = None, stamina: int = None, totalwins: int = None)

Use to create a new Idol in the Idol Stamina database or update existing info.

Date shall be formatted as YYYY-MM-DD e.g. 2024-07-23

Aliases: uis

Syntax:

!!updateidolstamina <name> <date> <stamina> <totalwins>

Example:

..code-block:: console

!!uis Rurino 2024-07-21 2 3

Parameters:
  • name (str, required) – The name of the idol

  • date (date, required (YYYY-MM-DD e.g. 2024-07-21)) – The date of their last win

  • stamina (int, required) – The current stamina drain (if any) else set 0

  • totalwins (int, required) – The overal total wins for the idol

Returns:

Confirmation message.

Return type:

discord.Message

Permissions

Author: LLR Admin

async forceupidolstamina(ctx)

Force update all Idol Stamina. Runs automatically before and after an LLR stream.

Aliases: uais

Syntax:

!!forceupidolstamina
Returns:

Confirmation message.

Return type:

discord.Message

Permissions

Author: LLR Admin

async testlb(ctx)

Command !!testlb.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async level_chart(ctx, name: str, current: int, max_value: int = 7)

Test command for bar charts using Discord’s boost system

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async remove_stream_requests(ctx, stream_id: int)

Removes all rows from the Stream_Request_History table that match the given stream_id.

Parameters:

stream_id (int) – The stream ID to search for and delete matching rows.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async show_stream_requests(ctx, stream_id: int = None)

Shows all stream requests in the Stream_Request_History table for a given stream_id.

Parameters:

stream_id (int, optional) – The stream ID to search for. Defaults to stream_number(self).

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async trackinfo(ctx, internal=False)

Command !!trackinfo.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async show_idol_stamina_table(ctx)

Displays all rows from the Idol_Stamina table.

Aliases: sist

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async endstaato(ctx)

Force end staato if it gets stuck or needs to be stopped.

Syntax:

!!endstaato
Returns:

Confirmation message showing staato was ended.

Return type:

discord.Message

Permissions

Author: LLR Admin

async fixstats(ctx, idol_name: str = None)

Recalculate idol stamina from each row’s last win date in SQL, and set totalwins and last-win date for every Idol_Stamina row from the featured sheet (same counts/dates as !!topfeatured / !!lastwin).

With no name: updates stamina for all idols, then syncs total wins for all. With a name: updates stamina for that idol only, then still syncs total wins for all idols.

Aliases: fixstamina (legacy name)

Syntax:

!!fixstats [idol_name]

Examples:

!!fixstats
!!fixstats Kanata
!!fixstamina
Parameters:

idol_name (str, optional) – The idol to fix stamina for. If omitted, fixes stamina for every idol in SQL.

Returns:

Confirmation messages for stamina and total-wins sync.

Return type:

discord.Message

Permissions

Author: LLR Admin

async checkstamina(ctx, idol_name: str = None)

Check the current stamina status of idols and show what their correct stamina should be.

Syntax:

!!checkstamina [idol_name]

Examples:

!!checkstamina
!!checkstamina Kanata
Parameters:

idol_name (str, optional) – The name of the idol to check. If not provided, shows all idols with incorrect stamina.

Returns:

Status message showing current vs correct stamina levels.

Return type:

discord.Message

Permissions

Author: LLR Admin

async task_snapshot(ctx, limit: int = 25)

One-shot debug snapshot of active asyncio tasks.

Syntax:

!!task_snapshot [limit]
Parameters:

limit (int, optional) – Maximum number of grouped task signatures to display.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async force_stop_timer(ctx)

Force stop the reqs_queue_timer and reset all stream states. Use this if the timer gets stuck.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)

async remove_chiibun_role(ctx)

Command !!remove_chiibun_role.

Permissions

Author: LLR Admin (server owner / bot owner)

Bot: View Channel, Send Messages (plus Connect/Speak for voice commands)