import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel

@always_command("based")
async def based(channel: MChannel, _match: Match, message: Message) -> None:
    if not channel.server_config("based.enabled", True):
        return

    match = re.search(r"\S\s+(based)[\s*?.!)]*$", message.content, re.IGNORECASE)
    if match is None:
        return

    if random.random() > 0.005:
        await channel.send("Based on what?")
    else:
        await channel.send("Not Based.")

@@ -325,19 +325,33 @@
 h(r%22
-%5CS%5Cs+
+%5E%5Cs*
 (based
+%7Cgebaseerd%7Cbas%C3%A9
 )%5B%5Cs
@@ -426,24 +426,322 @@
      return%0A
+    %0A    based = %22Based on what?%22%0A    unbased = %22Not Based.%22%0A%0A    if match.group(1).lower() == %22gebaseerd%22:%0A        based = %22Gebaseerd op wat?%22%0A        unbased = %22Niet Gebaseerd.%22%0A        %0A    elif match.group(1).lower() == %22bas%C3%A9%22:%0A        based = %22Sur quoi?%22%0A        unbased = %22Pas bas%C3%A9.%22%0A        
 %0A    if rand
@@ -788,32 +788,21 @@
 el.send(
-%22B
+b
 ased
- on what?%22
 )%0A    el
@@ -832,22 +832,17 @@
 el.send(
-%22Not B
+unb
 ased
-.%22
 )%0A

Improve based