Fix small bug with wordbot word score choice

The game ID was accidentally being added as a word to the wordlist. This
is no longer the case.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-07-02 18:04:13 -07:00
parent 15fd7bf032
commit 67192f2c5e

View File

@@ -70,8 +70,8 @@ defmodule Omnibot.Contrib.Wordbot.Db do
{:ok, game_id} = game_id(channel) do {:ok, game_id} = game_id(channel) do
# Much faster to just prepare everything in one go rather than enumerating all words # Much faster to just prepare everything in one go rather than enumerating all words
pattern = (0 .. length(words)) pattern = (0 .. length(words) - 1)
|> Enum.map(&"(?1, ?#{&1 + 1})") |> Enum.map(&"(?1, ?#{&1 + 2})")
|> Enum.join(", ") |> Enum.join(", ")
Sqlitex.Server.query( Sqlitex.Server.query(
__MODULE__, __MODULE__,