From 67192f2c5eae735f7d9f65062ebaf43520d58e9f Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Thu, 2 Jul 2020 18:04:13 -0700 Subject: [PATCH] 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 --- lib/contrib/wordbot/db.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/contrib/wordbot/db.ex b/lib/contrib/wordbot/db.ex index 0495421..5fd73b9 100644 --- a/lib/contrib/wordbot/db.ex +++ b/lib/contrib/wordbot/db.ex @@ -70,8 +70,8 @@ defmodule Omnibot.Contrib.Wordbot.Db do {:ok, game_id} = game_id(channel) do # Much faster to just prepare everything in one go rather than enumerating all words - pattern = (0 .. length(words)) - |> Enum.map(&"(?1, ?#{&1 + 1})") + pattern = (0 .. length(words) - 1) + |> Enum.map(&"(?1, ?#{&1 + 2})") |> Enum.join(", ") Sqlitex.Server.query( __MODULE__,