🤖 Mimi

Complete Command & Function Documentation

📋 Overview

Mefedron is a feature-rich Discord bot built with discord.py that provides game management, player tracking, role management, and various fun utilities for gaming communities.

Key Features

🎮 Game Management

  • Island respawn tracking (small & large)
  • Fort tracking with hit counts
  • Dragon timer notifications
  • Battleship game (vs bot & PvP ready)

👥 Server Management

  • Role management and notifications
  • Reaction role system
  • Welcome message configuration
  • Channel designation (commands, output)

📊 Tracking & Analytics

  • Player stat tracking (24h cycle)
  • Event-based statistics collection
  • Historical data storage

🎲 Fun Features

  • Spin/rewards system (with levels)
  • Random meme fetcher
  • Cat images/GIFs
  • Kondom calculator
  • Random fun messages

🎬 Youtube Integration

  • /play to play a song from youtube
  • /stop to cancel the song
  • /skip to skip the song
  • /leave to dismiss the bot

⚙️ Server Management Commands

/set command | output
Admin Only
Configure the command or output channel for the bot.
Parameters:
  • command - Set channel for bot commands
  • output - Set channel for bot notifications
/set command OR /set output
/jeff <new_nick>
Admin Only Utility
Change the bot's nickname in the current server.
Parameters:
  • new_nick - New nickname for the bot
/jeff Mimi Bot
/role add|remove|list <role>
Admin Only 30s Cooldown
Manage roles that receive notifications when islands spawn and events occur.
Parameters:
  • add - Add a role to notification list
  • remove - Remove a role from notification list
  • list - Show all configured notification roles
  • role - Discord role to manage
/role add @Gamers OR /role list
/removechannel command | output
Admin Only 30s Cooldown
Remove channel configuration for commands or output.
/removechannel command OR /removechannel output
/reactionrole <role> <emoji> [channel]
Admin Only
Set up a reaction role - users can click emoji to get role.
Parameters:
  • role - The Discord role to assign
  • emoji - Emoji to react with (standard or custom)
  • channel - Optional channel (defaults to current)
/reactionrole @Gamer 🎮 OR /reactionrole @VIP 💎 #roles
/removereactionrole <role> [channel]
Admin Only
Remove a reaction role configuration.
/removereactionrole @Gamer
/welcome [channel]
Admin Only
Set the channel where new member welcome messages are sent.
/welcome #welcome OR /welcome
/welcome_msg [message]
Admin Only
View or set custom welcome message. Use {member} placeholder for mention.
Usage:
  • /welcome_msg - View current message
  • /welcome_msg Welcome to our server {member}! - Set new message
/sync
Owner Only
Synchronize bot slash commands to the server. Owner-restricted command.
/checkroles
Admin Only 60s Cooldown
Check bot's role hierarchy and permissions for role assignment.

🏝️ Island & Respawn Commands

/mw <x> <y> <HH:MM>
Group Only
Track a small island (Mała Wyspa) respawn. 36-hour timer from death time.
Parameters:
  • x y - Island coordinates
  • HH:MM - Time until respawn (hours:minutes)
/mw 123 456 2:30
/dw <x> <y> <HH:MM>
Group Only
Track a large island (Duża Wyspa) respawn. 72-hour timer from death time.
Parameters:
  • x y - Island coordinates
  • HH:MM - Time until respawn (hours:minutes)
/dw 789 321 1:45
/remove <x> <y>
Group Only
Delete a respawn notification for an island at given coordinates.
/remove 123 456
/respawn <x> <y> <HH:MM>
Personal Timer
Set a personal dragon/respawn timer. Get DM notification when timer expires.
Parameters:
  • x y - Location coordinates
  • HH:MM - Time until respawn
/respawn 100 200 3:00

🏰 Fort Commands

/fort <x> <y> <hits>
Group Only
Add or update a fort with hit count (1-10). Posts notification with role mentions.
Parameters:
  • x y - Fort coordinates
  • hits - Number of hits remaining (1-10)
/fort 400 500 5
/hit <x> <y> [amount]
Group Only
Decrease fort hit count. Automatically removes fort when hits reach 0.
Parameters:
  • x y - Fort coordinates
  • amount - Hits to decrease (default: 1, max: 10)
/hit 400 500 OR /hit 400 500 2
/fortremove <x> <y>
Group Only
Remove a fort from tracking.
/fortremove 400 500

🎮 Gameplay Commands

Spin/Rewards System

/śmigło [count]
Fun 2 in 10s
Perform spin(s) to earn rewards. Supports multiple spins (1-20). Tracks level progression and rewards.
Parameters:
  • count - Number of spins (1-20, default: 1)
/śmigło OR /śmigło 10
/śmigło_stats
Fun 30s Cooldown
Display your spin statistics including level, total spins, and progress to next level. Shows Rubin jackpot count.
/śmigło_stats
/śmigło_reset [member] [level]
Fun 30s Cooldown
Reset spin stats to level 1 (or custom level). Admin can reset others.
Parameters:
  • member - Optional: user to reset (requires admin)
  • level - Starting level (default: 1)
/śmigło_reset OR /śmigło_reset @user 2

Battleship Game

/statki
Game
Start a new Battleship game against the bot. Place ships manually or use /ustaw.
/ustaw
Game
Auto-place ships on your Battleship board for an ongoing game.
/strzał <coordinate>
Game
Fire at the bot's board. Coordinates use format like A1, B3, etc.
Format: Letter (A-H) + Number (1-8)
/strzał A5 OR /strzał C3

🔧 Utility & Fun Commands

/purge com | out | all | custom [channel]
Admin Only 30s Cooldown
Delete bot messages from specified channels.
Options:
  • com - Clear command channel
  • out - Clear output channel
  • all - Clear both channels
  • custom #channel - Clear specific channel
/purge all OR /purge custom #announcements
/clear
Utility
Clear bot messages from your DMs. Useful for reducing spam. (DM only)
/cdn [text] [gif]
Fun 30s Cooldown
Get a random cat image or GIF from cataas.com. Optionally with text overlay.
Parameters:
  • text - Optional text for cat to say
  • gif - Set to true for animated GIF
/cdn OR /cdn "Meow" true
/meme [allow_nsfw]
Fun 30s Cooldown
Fetch a random meme from meme-api.com with embedded image and link.
Parameters:
  • allow_nsfw - Set true to allow NSFW memes (default: false)
/meme OR /meme allow_nsfw:true
/beka
Fun 60s Cooldown
Get a random fun message sent to your DMs. Must have DMs enabled.
/kondom
Fun 60s Cooldown
Get a random "kondom percentage" for yourself. Purely for fun!
/helpme
Utility
Display a comprehensive help message with command overview. (Owner only)

📊 Player Tracking Commands

/track add|remove|list|fetch [playername]
Admin Only 30s Cooldown
Manage player tracking system. Tracks player stats every 24 hours for events: Moc, Honor, Łup.
Actions:
  • add playername - Add player to tracking
  • remove playername - Remove single player
  • remove all - Remove all tracked players
  • list - Show all tracked players
  • fetch [playername|all] - Immediately fetch stats now
/track add PlayerName OR /track fetch all
/stats <playername>
Utility 30s Cooldown
Display collected statistics for a tracked player. Shows history of events with timestamps and values.
Event Types:
  • Osiągnięcia (Achievements)
  • Grabierz (Loot)
  • Honor (Honor)
  • Moc (Power)
  • And more...
/stats PlayerName
/sprzedaj <playername> <event_type>
Utility 30s Cooldown
Query player data from the game API for a specific event type. Shows player power/stats.
Event Types Include:
  • Moc (Power)
  • Honor (Honor)
  • Łup (Loot)
  • Berimond, Nomad, Samuraj, Liga, and more...
/sprzedaj PlayerName Moc

🎬 Youtube goodies

/play
Link a video to let the bot play it
/play 'url'
/stop
Stop the current song and clear the queue
/stop
/skip
Skip
/sip
/leave
Make the bot leave the voice channel
/leave

⚙️ Helper Functions

Database Helpers

set_setting(guild_id, key, value)
Store a guild-specific setting in the database.
get_setting(guild_id, key)
Retrieve a guild-specific setting from the database.
set_role(guild_id, name, role_id)
Store a role ID with a name for notification purposes.
get_role_id(guild_id, name)
Retrieve a role ID by name for a guild.
get_all_roles(guild_id)
Get dictionary of all configured roles for a guild.
remove_role(guild_id, name)
Remove a role from guild's notification list.

Respawn & Island Helpers

upsert_respawn(name1, name2, respawn_time, message_id)
Add or update an island respawn entry with coordinates and timestamp.
get_respawn(name1, name2)
Retrieve respawn info for coordinates. Returns (respawn_time, message_id).
respawn_time_to_unix(respawn_time_str)
Convert timestamp string to Unix timestamp for Discord display.

Fort Helpers

upsert_fort(name1, name2, hits, message_id)
Add or update fort with hit count.
get_fort(name1, name2)
Get fort data. Returns (hits, message_id, created_at).
remove_fort(name1, name2)
Delete fort from database.

Dragon/Timer Helpers

upsert_dragon(user_id, name1, name2, respawn_time)
Create or update a personal dragon timer for a user.
get_dragon(user_id, name1, name2)
Get a user's dragon timer data.
get_all_dragons()
Get all active dragon timers from database.
remove_dragon(user_id, name1, name2)
Delete a user's dragon timer.

Reaction Role Helpers

add_reaction_role(guild_id, channel_id, message_id, role_id, emoji)
Store a reaction-to-role mapping in database.
get_reaction_role(guild_id, channel_id, message_id, emoji)
Find role ID for a reaction emoji. Handles multiple emoji formats.
remove_reaction_role(guild_id, channel_id, message_id, emoji)
Delete a reaction role mapping.
get_all_reaction_roles(guild_id, channel_id)
Get all reaction role mappings for a channel.

Tracking Helpers

add_track(playername)
Add a player to the tracking system.
remove_track(playername)
Remove a player from tracking.
get_all_tracked_players()
Get list of all currently tracked players.
insert_tracked_stat(playername, event_type, second_id, raw_json)
Store a stat entry for a tracked player. Auto-prunes data older than 30 days.
get_tracked_stats(playername, limit=200)
Retrieve stats history for a player. Returns list of (event_type, second_id, raw_json, fetched_at).

Utility Functions

parse_input(args)
Parse island/respawn command arguments: "name1 name2 HH:MM". Returns tuple or (None, None, None).
parse_dragon(args)
Parse dragon timer arguments. Similar to parse_input.
generate_progress_bar(current, total, length=10)
Create a text-based progress bar using ▰▱ characters.

Authorization Decorators

@admin_only()
Restrict command to guild administrators.
@group_only()
Restrict command to configured notification roles only.
@command_channel_write_only()
Restrict command to designated command channel.
@UwU()
Restrict certain fun commands to designated channel.
@stary_only()
Restrict to specific user ID (owner).

🗄️ Database Schema

Tables Overview

The bot uses SQLite database with multiple tables for different features:

respawns

Stores island respawn tracking data.

name1 TEXT | name2 TEXT | respawn_time TEXT | message_id INTEGER
PRIMARY KEY (name1, name2)
forts

Tracks active forts with hit counts.

name1 TEXT | name2 TEXT | hits INTEGER | message_id INTEGER | created_at TEXT
PRIMARY KEY (name1, name2)
dragons

Stores personal dragon/respawn timers per user.

user_id INTEGER | name1 TEXT | name2 TEXT | respawn_time TEXT
PRIMARY KEY (user_id, name1, name2)
settings

Guild-specific key-value settings (command channel, output channel, etc).

guild_id INTEGER | key TEXT | value TEXT
PRIMARY KEY (guild_id, key)
roles

Named role IDs for notification purposes per guild.

guild_id INTEGER | name TEXT | role_id INTEGER
PRIMARY KEY (guild_id, name)
reaction_roles

Maps emoji reactions to role assignments.

guild_id INTEGER | channel_id INTEGER | message_id INTEGER | role_id INTEGER | emoji TEXT
PRIMARY KEY (guild_id, channel_id, message_id, emoji)
tracks

List of players being tracked for statistics.

playername TEXT PRIMARY KEY | created_at TEXT
tracked_stats

Historical player statistics data with timestamps.

playername TEXT | event_type INTEGER | second_id TEXT | raw_json TEXT | fetched_at TEXT
welcome_settings

Per-guild welcome message and channel configuration.

guild_id INTEGER PRIMARY KEY | channel_id INTEGER | welcome_msg TEXT | enabled INTEGER | assign_role INTEGER | created_at TEXT | updated_at TEXT

Background Tasks

Task Frequency Description
check_timers() Every 60 seconds Check island respawn timers and post notifications when ready
check_dragon_timers() Every 60 seconds Check personal dragon timers and send DM notifications to users
track_daily() Every 24 hours Fetch and store stats for all tracked players from the API
change_status() Every 15 minutes Rotate bot's Discord status/activity message

API Integration

Service Purpose Endpoint
Game API Player stats & rankings https://mefedron.online/e4kpl/?
Cat Images Random cat photos/GIFs https://cataas.com/cat
Meme API Random memes https://meme-api.com/gimme

📋 Commands Quick Reference

Command Type Restriction Cooldown
/set Config Admin None
/mw, /dw Island Group None
/fort, /hit, /fortremove Fort Group None
/respawn Timer Command Channel None
/purge Config Admin 30s
/role Config Admin 30s
/beka Fun Command Channel 60s
/cdn, /meme Fun Command Channel 30s
/śmigło Game Command Channel 2 in 10s
/track Tracking Admin 30s
/stats Tracking Command Channel 30s
/sprzedaj API Query Command Channel 30s

📝 Important Notes

✓ Command Prefix Support: All commands support both slash (/) and prefix (!) notation. Slash commands are recommended for better UX.
⚠️ Configuration Required: Before using island/fort/respawn commands, set up:
  • Output channel: /set output
  • Command channel: /set command
  • Notification roles: /role add @RoleName
✓ Timezone: All timestamps use Europe/Warsaw timezone (CET/CEST).
⚠️ Rate Limiting: Respect cooldown timers. Attempting commands on cooldown triggers a friendly warning.
✓ DM Notifications: Dragon/respawn timers require users to have DMs enabled. Bot will notify if messages can't be sent.
⚠️ Admin Functions: Channel and role management commands require administrator permissions.
✓ Database Auto-Cleanup: Tracked stats older than 30 days are automatically removed.
⚠️ Bot Permissions: Ensure the bot has necessary permissions in Discord server for full functionality (manage messages, send DMs, read message history, etc).
⚠️ External APIs: Some commands rely on external APIs (game stats, memes, cat images). If these services are down, related commands may not work.
❌ Youtube is a disgusting platform: The bot uses yt-dl and ffmpeg there is a fallback to the youtube search API but it is limited some videos may not be found.