Admin Moduleο
- class Admin(*args: Any, **kwargs: Any)ο
Bases:
CogA 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
- async force_bday_idol(ctx, name=None)ο
Manually force Birthday Idol name into newidol embeds
Aliases:
fbiSyntax:
!!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
- async server_stats(ctx)ο
LLR Stats for Nations.
Aliases:
ssSyntax:
!!server_stats- Returns:
Server statistics including total members, members with a nation, and percentages of each nation role
- Return type:
discord.Message
- 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
- async roles(ctx)ο
List all server roles
Syntax:
!!roles- Returns:
A list of all server roles
- Return type:
discord.Embed
- 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
- 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
- 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
- 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
- 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
- async check_permissions(ctx, *, member: Member = None)ο
Checks and displays the permissions of the user or a mentioned user in the server.
Aliases:
perms,permissionsSyntax:
!!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
- 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
- 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
- async revert_chiichan_spam(ctx)ο
Manually reverts the name of #general-2.
Aliases:
gen2Syntax:
!!revert_chiichan_spam- Returns:
Confirmation message.
- Return type:
discord.Message
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
- 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
- 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
- async list_nation_roles(ctx)ο
Get most nation role names and idβs quickly
Aliases:
nations
- 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
- 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
- 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
- async edit_message(ctx, channel: channel_converter, message_id: int, *, new_content: str)ο
Edits a message sent by Chisato in a specified channel.
Aliases:
msgeditSyntax:
!!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
- 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:
gsSyntax:
!!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
helpandshow.- 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 whelpor 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 helpfor [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
- async create_embed(ctx, channel: channel_converter)ο
Send an embedded message as Chisato
- 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
- 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
- async enable_reactions(ctx, channel: TextChannel, member: Member)ο
42GAMI Override to add reactions in Nations
- async show_context(ctx)ο
Command
!!show_context.
- 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.
- 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.
- 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).
- async import_message_stats(ctx, year: int = None, file_path: str = None)ο
Import message statistics from Manmaruβs JSON file into the database.
Aliases:
importmsgstatsCan 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)
- async scrape_message_date(ctx, target_date: str | None = None)ο
Manually scrape messages for a specific date.
Aliases:
scrapedate,scrapedaySyntax:
!!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
- async retry_daily_message_log(ctx, target_date: str | None = None)ο
Manually retry daily message logging for a specific date.
Aliases:
retrymsglog,retrydailylogSyntax:
!!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
- async channel_usage_graph(ctx, year: int | None = None, *channel_names: str)ο
Generate a line graph showing channel usage over time (monthly).
Aliases:
channelgraph,channelusageSyntax:
!!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
- 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,emoteusageSyntax:
!!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
- async weekly_message_log_status(ctx)ο
View the status of daily message logging for the past 7 days.
Aliases:
msglogstatus,dailylogstatusSyntax:
!!weekly_message_log_status- Returns:
A list showing which days succeeded or failed
- Return type:
discord.Message
- async scrape_incomplete_days(ctx)ο
Manually scrape all incomplete days from the past week.
Aliases:
scrapeincomplete,scrapemissingSyntax:
!!scrape_incomplete_days- Returns:
Confirmation messages for each day being scraped
- Return type:
discord.Message
- async list_failed_message_logs(ctx)ο
List all days that failed to process in daily message logging.
Aliases:
failedmsglogSyntax:
!!list_failed_message_logs- Returns:
A list of failed days with error messages
- Return type:
discord.Message
- 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