diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-26 19:26:06 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2024-03-26 19:26:06 +0000 |
commit | 23ba0fb8fc5070ba30a43035970775247da370f3 (patch) | |
tree | cf5ece53be0c5197a0c2b9d8c7233436ec6ba2e9 /markov/markov.py | |
parent | 8b0d67202a0ebbfa17d53d56bef9e515574bdb66 (diff) | |
download | aps-cogs-23ba0fb8fc5070ba30a43035970775247da370f3.tar aps-cogs-23ba0fb8fc5070ba30a43035970775247da370f3.tar.gz aps-cogs-23ba0fb8fc5070ba30a43035970775247da370f3.zip |
teleport: don't teleport within same channel, better text
Diffstat (limited to 'markov/markov.py')
-rw-r--r-- | markov/markov.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/markov/markov.py b/markov/markov.py index d7cf14b..9965d65 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -36,7 +36,8 @@ class Markov(commands.Cog): async def cog_load(self): with open( - redbot.core.data_manager.bundled_data_path(self) / "init.sql", "r" + redbot.core.data_manager.bundled_data_path(self) / "migrations/init.sql", + "r", ) as setup_script_file: async with aiosqlite.connect(self.db_path) as db: await db.executescript(setup_script_file.read()) @@ -92,7 +93,7 @@ class Markov(commands.Cog): + [ token for token in re.findall( - r"[\w']+|[\.,!?\/;\(\)]|<a?:\w+:\d+>|<#\d+>|<@!?\d+>", content + r"[\w']+|[\.,!?/;()]|<a?:\w+:\d+>|<#\d+>|<@!?\d+>", content ) if len(token) <= MAX_TOKEN_LENGTH ] |