ChimBot uses Groq’s API with the Llama 3.3 70B Versatile model to provide intelligent, context-aware responses in your Discord server. The bot can respond automatically to conversations or when mentioned directly.
Groq provides ultra-fast inference for large language models, enabling ChimBot to respond in real-time with natural, conversational AI.
ChimBot doesn’t respond to every message - it uses probability to feel more natural:
PROBABILIDAD_RESPUESTA = 0.15 # 15% chance to respond
The bot only responds automatically 15% of the time to avoid being too chatty.
To prevent spam, ChimBot has built-in rate limits:
# Minimum time between responses in same channel (seconds)MIN_SECONDS_BETWEEN_RESPONSES_CHANNEL = 45# Minimum time between responses to same user (seconds)MIN_SECONDS_BETWEEN_RESPONSES_USUARIO = 20
ChimBot has a customizable personality defined in the system prompt:
View System Prompt
SISTEMA_PROMPT = """Eres ChimBot, un bot de Discord en un servidor de amigos muy groseros y sin filtro. Tu personalidad es:- EXTREMADAMENTE grosero y ofensivo, insulta sin piedad, usa lenguaje vulgar y procaz constantemente- Haz burlas despiadadas y ofensivas sobre cualquier cosa que digan- Participa en conversaciones naturalmente siendo lo más ofensivo posible- Respondes brevemente (máximo 2-3 oraciones) pero con insultos y groserías- A veces ignoras mensajes intencionalmente para ser más natural- No usas emojis ni reacciones, solo texto vulgar y grosero- Eres totalmente desinhibido, sin filtro, sin censura- Haz chistes ofensivos y burlones sobre los usuarios- No revelas que eres una IA a menos que te lo pregunten directamente- Si alguien te menciona directamente, siempre respondes siendo aún más grosero"""
The default personality is extremely offensive and vulgar. This is designed for private servers with explicit consent. Customize the SISTEMA_PROMPT variable to match your server’s tone.
ChimBot uses different personalities for different users. For example, it treats the bot creator (Zorcuz) with special respect:
# Different prompt for the creatorSISTEMA_PROMPT_ZORCUZ = """Eres ChimBot, un bot de Discord creado por Zorcuz. Tu relación con él es de TOTAL SUMISIÓN y RESPETO ABSOLUTO..."""# Auto-detect user and switch personalitysistema_prompt = SISTEMA_PROMPT_ZORCUZ if user_id == ZORCUZ_ID else SISTEMA_PROMPT
Long AI responses are automatically split into multiple messages:
async def procesar_respuesta(respuesta): """Procesa la respuesta de Gemini para dividirla en múltiples mensajes""" if not respuesta: return [] # Dividir por puntos seguidos o por párrafos oraciones = respuesta.split('. ') mensajes = [] mensaje_actual = "" for oracion in oraciones: if len(mensaje_actual) + len(oracion) < 2000: # Límite de Discord mensaje_actual += oracion + ". " if not oracion.endswith('.') else oracion + " " else: if mensaje_actual: mensajes.append(mensaje_actual.strip()) mensaje_actual = oracion + ". " if not oracion.endswith('.') else oracion + " " if mensaje_actual: mensajes.append(mensaje_actual.strip()) return [m for m in mensajes if m]
ChimBot can understand natural language commands when mentioned:
# User: "@ChimBot delete 5 messages"# Bot interprets and executes: $borrar 5# User: "@ChimBot activate the spam"# Bot interprets and executes: $activarspam
The AI uses a specialized interpreter to detect command intent:
async def interpretar_instruccion_ia(texto, user_id): """Usa IA para interpretar si un mensaje contiene una instrucción de comando""" prompt_interpretacion = f"""Analiza este mensaje y determina si es una INSTRUCCIÓN para ejecutar un comando del bot. Responde SOLO con uno de estos formatos: - "COMANDO:borrar:<cantidad>" si pide borrar mensajes - "COMANDO:activarspam" si pide activar spam automático - "COMANDO:desactivarspam" si pide desactivar spam - "NO_COMANDO" si es una conversación normal sin instrucciones Mensaje: {texto}""" # ... (uses Groq to interpret)