aboutsummaryrefslogtreecommitdiff
path: root/markov
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2024-03-26 19:26:06 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2024-03-26 19:26:06 +0000
commit23ba0fb8fc5070ba30a43035970775247da370f3 (patch)
treecf5ece53be0c5197a0c2b9d8c7233436ec6ba2e9 /markov
parent8b0d67202a0ebbfa17d53d56bef9e515574bdb66 (diff)
downloadaps-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')
-rw-r--r--markov/data/migrations/init.sql (renamed from markov/data/init.sql)0
-rw-r--r--markov/markov.py5
2 files changed, 3 insertions, 2 deletions
diff --git a/markov/data/init.sql b/markov/data/migrations/init.sql
index 71ec073..71ec073 100644
--- a/markov/data/init.sql
+++ b/markov/data/migrations/init.sql
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
]