Admin Module

class Admin(*args: Any, **kwargs: Any)

Bases: Cog

A module to assist admins with various utils for their server.

Attention

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

async react(ctx, channel: TextChannel, message_id: int, emoji: str)

Add a reaction as Chisato to a message. The emote used must be from a guild that Chii-chan is also in.

Syntax:

!!react <ch_mention> <msg_id> <emoji>

Example:

!!react #general 1234567890123456789 😊
Parameters:
  • channel (discord.TextChannel) – The channel containing the message

  • message_id (int) – The ID of the message to react to

  • emoji (discord.Emoji) – The emoji to react with

Returns:

Confirmation message or error message, a reaction on the message given.

Return type:

discord.Message, discord.Emoji

Permissions

Author: Administrator

Bot: Add Reactions

async force_bday_idol(ctx, name=None)

Manually force Birthday Idol name into newidol embeds

Aliases: fbi

Syntax:

!!force_bday_idol [name]

Example:

!!fbi Mari
Parameters:

name (str, optional) – The name of the Birthday Idol to force into embeds, optional. If not set, the currently forced name will be removed.

Returns:

Confirmation message

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async server_stats(ctx)

LLR Stats for Nations.

Aliases: ss

Syntax:

!!server_stats
Returns:

Server statistics including total members, members with a nation, and percentages of each nation role

Return type:

discord.Message

Permissions

Author: LLR, LLR Admin

async ping(ctx)

Ping’s a pre-determined server to see latency of the bot

Syntax:

!!ping
Returns:

Latency statistics including web socket latency and total latency

Return type:

discord.Message

Permissions

Author: Administrator

async roles(ctx)

List all server roles

Syntax:

!!roles
Returns:

A list of all server roles

Return type:

discord.Embed

Permissions

Author: Administrator

async say(ctx, opt: int | None, channel: TextChannel | None, *, msg=None)

Used to send messages to any channel as Chisato

Syntax:

!!say <channel> <msg>

Example:

!!say #general This is a message.
Parameters:
  • channel (discord.TextChannel, optional) – The channel to send the message to.

  • msg (str, optional) – The message content to send.

Returns:

A message sent as Chisato

Return type:

discord.Message

Permissions

Author: Administrator

async supporters(ctx)

View all of LLR’s Supporters (Premium Members)

Syntax:

!!supporters
Returns:

A message listing all supporters in the server, categorized by their roles.

Return type:

discord.Message

Permissions

Author: LLR Admin

async report(ctx)

Returns total member counts for server, bots, boosts, and patrons.

Syntax:

!!report
Returns:

A message displaying the total member counts for the server, including bots, boosts, and patrons.

Return type:

discord.Message

Permissions

Author: LLR Admin

async role(ctx, *args)

Returns a list of all members in the role given.

Syntax:

!!role <role_name>

Example:

!!role Admins
Parameters:

role_name (str, required) – The name of the role to list members from.

Returns:

A message listing all members in the specified role.

Return type:

discord.Message

Permissions

Author: Administrator

async purge(ctx, limit: int | None, channel: TextChannel = None)

Deletes the last Nth number of messages from a specified channel.

Defaults to deleting 1 message if no limit is provided.

The channel can be specified; otherwise, it defaults to the current channel.

If the current channel is defaulted to, the message executing the command will automatically be deleted and is not counted in the β€˜limit’.

Syntax:

!!purge [limit] [channel]

Example:

!!purge
!!purge 5
!!purge #my-channel 50
Parameters:
  • limit (int, optional) – The number of messages to delete. Defaults to 1 if not specified.

  • channel (discord.TextChannel, optional) – The channel from which to delete messages. If not specified, the current channel is used.

Returns:

A confirmation message of the number of messages deleted.

Return type:

discord.Message

Permissions

Author: Administrator

async check_permissions(ctx, *, member: Member = None)

Checks and displays the permissions of the user or a mentioned user in the server.

Aliases: perms, permissions

Syntax:

!!perms [member]

Example:

!!perms
!!perms @User
Parameters:

member (discord.Member, optional) – The member whose permissions you want to check. Defaults to the command invoker if not specified.

Returns:

An embedded message showing the permissions of the specified member.

Return type:

discord.Embed

Permissions

Author: Administrator

async lockdown(ctx: Context, channel: TextChannel = None, role1: Role = None)

Initiates a server lockdown to prevent message sending in specified channels or server wide in case of raids.

Syntax:

!!lockdown [channel] [role]

Example:

!!lockdown
!!lockdown #my-channel
Parameters:
  • channel (discord.TextChannel, optional) – The channel to lockdown. Defaults to the all if none supplied.

  • role1 (discord.Role, optional) – The role to be restricted from sending messages. Defaults to all if none supplied.

Returns:

A confirmation message and an embedded report of the lockdown status.

Return type:

discord.Message

Permissions

Author: LLR Admin

Bot: Manage Roles, Manage Channels

async unlock(ctx: Context, channel: TextChannel = None, role1: Role = None)

Restores normal functionality to the server after a lockdown.

Syntax:

!!unlock
Parameters:
  • channel (discord.TextChannel, optional) – The channel to unlock. Defaults to the all if none supplied.

  • role1 (discord.Role, optional) – The role to be allowed to send messages again. Defaults to all if none supplied.

Returns:

A confirmation message and an embedded report of the unlock status.

Return type:

discord.Message

Permissions

Author: LLR Admin

Bot: Manage Roles, Manage Channels

async revert_chiichan_spam(ctx)

Manually reverts the name of #general-2.

Aliases: gen2

Syntax:

!!revert_chiichan_spam
Returns:

Confirmation message.

Return type:

discord.Message

Permissions

Author: LLR Admin

Deprecated since version β€”: 04/06/2024

async remove(ctx, role: Role)

Removes all members from the specified role.

Syntax:

!!remove <role>

Example:

!!remove @RoleName
Parameters:

role (discord.Role) – The role from which all members will be removed.

Returns:

Confirmation message about the removal or an error message if the operation fails.

Return type:

discord.Message

Permissions

Author: Administrator

async icon(ctx, idol)

Manually changes the server icon to a specified idol.

Syntax:

!!icon <idol>

Example:

!!icon mia
Parameters:

idol (str, required) – The name of the idol, which determines the image file used for the server icon.

Returns:

An embed message indicating whether the icon was successfully updated or if the file was not found.

Return type:

discord.Message

Permissions

Author: Administrator

Bot: Manage Server

async banner(ctx, idol)

Manually changes the server banner to a specified idol.

Syntax:

!!banner <idol>

Example:

!!banner kanata
Parameters:

idol (str, required) – The name of the idol, which determines the image file used for the server banner.

Returns:

An embed message indicating whether the banner was successfully updated or if the file was not found.

Return type:

discord.Message

Permissions

Author: Administrator

Bot: Manage Server

async list_nation_roles(ctx)

Get most nation role names and id’s quickly

Aliases: nations

Permissions

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

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

async roleinfo(ctx, *, role_input)

Returns detailed information about a role based on its name or ID.

Syntax:

!!roleinfo <role_name_or_ID>

Example:

!!roleinfo Admin
!!roleinfo 1087209602619293738
Parameters:

role_input (str or int, required) – The name or ID of the role to retrieve information about.

Returns:

An embed message containing detailed information about the specified role.

Return type:

discord.Message

Permissions

Author: Administrator

Bot: Manage Roles

async rreact(ctx, channel_id, message_id, emoji_name)

Removes all reactions of a specified emoji from a particular message. To prevent API time-outs the rate is set to 1 reaction per second.

Syntax:

!!rreact <channel_id> <message_id> <emoji_name>

Example:

!!rreact 123456789012345678 987654321098765432 :thumbsup:
Parameters:
  • channel_id (int, required) – The ID of the channel where the message is located.

  • message_id (int, required) – The ID of the message from which reactions will be removed.

  • emoji_name (str or int, required) – The name or ID of the emoji whose reactions will be removed.

Returns:

A message indicating whether reactions of the specified emoji were found and removed.

Return type:

discord.Message

Permissions

Author: Administrator

Bot: Manage Messages

async get_reactions(ctx, channel_id, message_id)

Lists all reactions on a specified message.

Syntax:

!!get_reactions <channel_id> <message_id>

Example:

!!get_reactions 1086415482342621235 1266428523695050792
Parameters:
  • channel_id (int, required) – The ID of the channel where the message is located.

  • message_id (int, required) – The ID of the message whose reactions will be listed.

Returns:

A list of reactions on the specified message, including emoji names and IDs.

Return type:

discord.Message

Permissions

Author: Administrator

async edit_message(ctx, channel: channel_converter, message_id: int, *, new_content: str)

Edits a message sent by Chisato in a specified channel.

Aliases: msgedit

Syntax:

!!edit_message <channel_id> <message_id> <new_content>

Example:

!!msgedit 123456789012345678 987654321098765432 "Updated content of the message."
Parameters:
  • channel (discord.TextChannel) – The channel where the message is located.

  • message_id (int, required) – The ID of the message to be edited.

  • new_content (str, required) – The new content to set for the message.

Returns:

Confirmation of message edit or an error message.

Return type:

discord.Message

Permissions

Author: Administrator

async guild_setup(ctx, setting_number: int = None, *, new_value: str = None)

Basic guild setup for how Chii-chan handles things in your Guild.

Aliases: gs

Syntax:

!!guild_setup [setting_number] [new_value]

Example:

!!gs
!!gs 0 help
!!gs 9 true
!!gs 19 #my-channel
Parameters:
  • setting_number (int, optional) – The number relevant to the setting you wish to access

  • new_value (see below) – The new value for the setting

Returns:

Updated guild settings

Return type:

discord.Embed

Options:

  • 0 is used as a default prefix for other options, such as help and show.

    type 0:

    int, required

  • 1 Public update channel is automatically generated if you are a community server, else defaults to None This is where I will send important communications to Admins if the situation arises.

    type 1:

    discord.TextChannel, required

  • 2 System channel is automatically generated if you have this enabled, else defaults to None This is a backup if your server does not have 1.

    type 2:

    discord.TextChannel, required

  • 3 Announcement channel is automatically generated if you are a community server, else defaults to None This is where I will send Character birthday announcements.

    type 3:

    discord.TextChannel, required

  • 4 Logging channel is None by default, and will be used for 8, 9 and 10 if any are enabled.

    type 4:

    discord.TextChannel, required

  • 5 Member join channel is None by default. This needs to be set for your Welcome Message to be sent alongside 6 and 7.

    type 5:

    discord.TextChannel, required

  • 6 Member join message is None by default. This needs to contain a message in order for your Welcome Message to be sent alongside 6 and 8. For detailed information on Welcome Message use gs 0 whelp or see below.

    type 6:

    json, required

  • 7 Member join send message is False by default. This needs to be True for your Welcome Message to be sent alongside 5 and 6.

    type 7:

    bool, required

  • 8 Member logging is False by default. This needs to be True alongside 4 to get detailed logs of members joining and leaving your server.

    type 8:

    bool, required

  • 9 Role logging is False by default. This needs to be True alongside 4 to get updates on members roles.

    type 9:

    bool, required

  • 10 Message logging is False by default. This needs to be True alongside 4 to log messages within your server. It will track edited and deleted messages.

    type 10:

    bool, required

  • 11 Moderator Role is None by default. You can set one mod role to whitelist for my Administrator commands. (Currently inactive)

    type 11:

    bool, required

  • 12 Twitter Embeds is False by default. If a message sent contains https://twitter.com/ or https://x.com/ it will embed the tweet. Note this has a global over-ride for when the API is down.

    type 12:

    bool, required

  • 13 Instagram Reel Embeds is False by default. If a message sent contains an instagram.com/reel/ link it will rewrite it to kkinstagram.com for Discord embeds.

    type 13:

    bool, required

  • 14 TikTok Embeds is False by default. If a message sent contains a tiktok.com link it will rewrite it to a.tnktok.com (fxtiktok) for Discord embeds.

    type 14:

    bool, required

  • 15 Character birthday announcements is False by default and needs 3. Note: The bot needs send messages in the announcements channel.

    type 15:

    bool, required

  • 16 Blacklist users is True by default. This helps protect your Guild from serial offenders including severe harrassment, gore posters and raiders. Guild owners can disable this feature if they wish to opt-out with gs 16 false.

    type 16:

    bool, required

  • 17 Starboard is False be default. This lets members ⭐ react messages and have it sent to a special channel when it receives enough star reactions. Requires 18 and 19.

    type 17:

    bool, required

  • 18 Stardboard Threshold is 5 by default. This is the minimum number of ⭐ reactions required on a message for it to be posted to your starboard channel. If a message is posted and later falls underneath this limit it will be deleted from your Starboard. Requires 17 and 19.

    type 18:

    int, required

  • 19 Starboard Channel is None by default. This is where your Starboard posts will be posted to. Requires 17 and 18.

    type 19:

    discord.TextChannel, required

Command Settings (see gs 0 help for [20]–[31]):

  • 20 Restrict commands to specified channels (False by default).

  • 21 Bot channels β€” one or more channel mentions where restricted commands may run (none clears).

  • 22–31 Per-category restrict toggles (False by default each).

Welcome Message:

Welcome Message can accept plain text or embeds. You will need settings 5, 6 & 7 set correctly in order for it to work.

You can use three operators within it:

  • {{member}} will use the new members plain text name.

  • {{mention}} will mention the new member.

  • {{guild}} will display your Guild’s name.

Embeds must be in JSON format in order to work correctly. If you are unfamiliar with embeds and/or json, use this visualizer.

If you want to test your Welcome Message, you can run the command tmj. Note if you have 4 and 8 enabled, it will trigger a member log as well.

To see the current value of your welcome message in plain text run gs 0 show

Permissions

Author: Administrator

async create_embed(ctx, channel: channel_converter)

Send an embedded message as Chisato

Permissions

Author: Administrator

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

async embededit(ctx, channel: channel_converter, message_id: int)

Edits an embedded message in a specified channel using JSON data. Note that the command accepts the json within a markdown code block only.

Whilst unusual, it vastly improves the readability of it for reference or other mods.

Syntax:

!!embededit <channel_id> <message_id> ```json { "title": "New Title", "description": "New Description" }```

Example:

!!embededit 123456789012345678 987654321098765432 ```json { "title": "Updated Title", "description": "Updated Description" } ```
Parameters:
  • channel (discord.TextChannel) – The channel where the message is located.

  • message_id (int) – The ID of the message to be edited.

Returns:

Confirmation of message edit or an error message.

Return type:

discord.Embed

Permissions

Author: Administrator

async raffleany(ctx, role: Role = None)

Raffles a random user from the specified role.

Syntax:

!!raffleany <role>

Example:

!!raffleany @YourRole
Parameters:

role (discord.Role) – The role from which to select a random member.

Returns:

The mention of the randomly selected member or an error message if no members are in the role.

Return type:

discord.Message

Permissions

Author: Administrator

async enable_reactions(ctx, channel: TextChannel, member: Member)

42GAMI Override to add reactions in Nations

Permissions

Author: LLR Admin (server owner / bot owner)

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

async show_context(ctx)

Command !!show_context.

Permissions

Author: LLR Admin (server owner / bot owner)

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

async stream_force_played(ctx, user_id: int, song: str, stream: int = None)

Marks a song request as β€˜Played’ in the Stream_Request_History table.

Parameters: - user_id: The ID of the user who requested the song. - song: The title of the song to update. - stream: The stream ID. Defaults to the current stream number.

Permissions

Author: LLR Admin (server owner / bot owner)

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

async stream_force_song(ctx, user_id: int, song: str, corrected_song: str, stream: int = None)

Force change an artist in the Stream_Request_History table.

Parameters: - user_id: The ID of the user who requested the song. - song: The title of the song to match as per its current form in db - corrected_song: The song title with corrected title - stream: The stream ID. Defaults to the current stream number.

Permissions

Author: LLR Admin (server owner / bot owner)

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

async show_stream_reqs(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 import_message_stats(ctx, year: int = None, file_path: str = None)

Import message statistics from Manmaru’s JSON file into the database.

Aliases: importmsgstats

Can accept a JSON file as a Discord attachment, or read from a file path. If year is not specified, it will try to extract from filename (e.g., message_stats_2025.json -> 2025).

Syntax:

!!import_message_stats [year] [file_path]

Examples:

!!import_message_stats 2025
!!import_message_stats 2025 ../manmaru/message_stats_2025.json
!!import_message_stats (with JSON file attached)

Permissions

Author: LLR Admin (server owner / bot owner)

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

async scrape_message_date(ctx, target_date: str | None = None)

Manually scrape messages for a specific date.

Aliases: scrapedate, scrapeday

Syntax:

!!scrape_message_date [date]

Examples:

!!scrape_message_date
!!scrape_message_date 2026-01-01
!!scrape_message_date 2026-01-02
Parameters:

target_date (str, optional) – The date to scrape in YYYY-MM-DD format. Defaults to yesterday if not provided.

Returns:

Confirmation message with results

Return type:

discord.Message

Permissions

Author: LLR Admin

async retry_daily_message_log(ctx, target_date: str | None = None)

Manually retry daily message logging for a specific date.

Aliases: retrymsglog, retrydailylog

Syntax:

!!retry_daily_message_log [date]

Examples:

!!retry_daily_message_log
!!retry_daily_message_log 2026-01-15
Parameters:

target_date (str, optional) – The date to retry in YYYY-MM-DD format. Defaults to yesterday if not provided.

Returns:

Confirmation message with results

Return type:

discord.Message

Permissions

Author: LLR Admin

async channel_usage_graph(ctx, year: int | None = None, *channel_names: str)

Generate a line graph showing channel usage over time (monthly).

Aliases: channelgraph, channelusage

Syntax:

!!channel_usage_graph [year] [channel1] [channel2] ...

Examples:

!!channel_usage_graph
!!channel_usage_graph 2026
!!channel_usage_graph 2026 general stream-chat
Parameters:
  • year (int, optional) – The year to visualize. Defaults to current year.

  • channel_names (str, optional) – Specific channel names to include. If not provided, shows top 10 channels.

Returns:

A line graph image showing channel usage over time

Return type:

discord.File

Permissions

Author: LLR Admin

async emote_usage_graph(ctx, year: int | None = None, usage_type: str = 'used', top_n: int = 10)

Generate a line graph showing emote usage over time (monthly).

Aliases: emotegraph, emoteusage

Syntax:

!!emote_usage_graph [year] [usage_type] [top_n]

Examples:

!!emote_usage_graph
!!emote_usage_graph 2026 used 15
!!emote_usage_graph 2026 reacted 5
Parameters:
  • year (int, optional) – The year to visualize. Defaults to current year.

  • usage_type (str, optional) – Either β€œused” (in messages) or β€œreacted” (as reactions). Defaults to β€œused”.

  • top_n (int, optional) – Number of top emotes to show. Defaults to 10.

Returns:

A line graph image showing emote usage over time

Return type:

discord.File

Permissions

Author: LLR Admin

async weekly_message_log_status(ctx)

View the status of daily message logging for the past 7 days.

Aliases: msglogstatus, dailylogstatus

Syntax:

!!weekly_message_log_status
Returns:

A list showing which days succeeded or failed

Return type:

discord.Message

Permissions

Author: LLR Admin

async scrape_incomplete_days(ctx)

Manually scrape all incomplete days from the past week.

Aliases: scrapeincomplete, scrapemissing

Syntax:

!!scrape_incomplete_days
Returns:

Confirmation messages for each day being scraped

Return type:

discord.Message

Permissions

Author: LLR Admin

async list_failed_message_logs(ctx)

List all days that failed to process in daily message logging.

Aliases: failedmsglog

Syntax:

!!list_failed_message_logs
Returns:

A list of failed days with error messages

Return type:

discord.Message

Permissions

Author: LLR Admin

async qateam(ctx, member: Member, action: str | None = None)

Add or remove the QA Team role for a specified user.

Syntax:

!!qateam <user_id or mention> [add/remove]

Example:

!!qateam @User add
!!qateam @User remove
!!qateam 123456789012345678 add
!!qateam @User  (toggles if action not specified)
Parameters:
  • member (discord.Member) – The member to add/remove the QA Team role from (can be mention or user ID)

  • action (str, optional) – Optional action - β€œadd” or β€œremove”. If not specified, toggles the role.

Returns:

Confirmation message indicating whether the role was added or removed

Return type:

discord.Message

Attention

Author Permissions: Gami or Yume only

Permissions

Author: <lambda>

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