diff --git a/lib/nostrum/shard/connector.ex b/lib/nostrum/shard/connector.ex index e211c5587..788fa4432 100644 --- a/lib/nostrum/shard/connector.ex +++ b/lib/nostrum/shard/connector.ex @@ -39,4 +39,8 @@ defmodule Nostrum.Shard.Connector do Process.sleep(@wait_time - time) {:reply, :ok, %{state | last_connect: Util.now()}} end + + def code_change(_version, state, _extra) do + {:ok, state} + end end diff --git a/lib/nostrum/voice.ex b/lib/nostrum/voice.ex index b82f6e284..d72cd1d0f 100644 --- a/lib/nostrum/voice.ex +++ b/lib/nostrum/voice.ex @@ -773,6 +773,11 @@ defmodule Nostrum.Voice do {:noreply, Map.delete(state, guild_id)} end + @doc false + def code_change(_version, state, data, _extra) do + {:ok, state, data} + end + @doc false def start_if_ready(%VoiceState{} = voice) do if VoiceState.ready_for_ws?(voice) do diff --git a/lib/nostrum/voice/ports.ex b/lib/nostrum/voice/ports.ex index 0c7b0ab1c..6fa280f55 100644 --- a/lib/nostrum/voice/ports.ex +++ b/lib/nostrum/voice/ports.ex @@ -160,4 +160,8 @@ defmodule Nostrum.Voice.Ports do def handle_info(_, state) do {:noreply, state} end + + def code_change(_version, state, data, _extra) do + {:ok, state, data} + end end diff --git a/lib/nostrum/voice/session.ex b/lib/nostrum/voice/session.ex index b0d449496..74f79e8de 100644 --- a/lib/nostrum/voice/session.ex +++ b/lib/nostrum/voice/session.ex @@ -214,6 +214,10 @@ defmodule Nostrum.Voice.Session do :gun.close(state.conn) end + def code_change(_old_vsn, state, _extra) do + {:ok, state} + end + def restart_session_async(state) do spawn(fn -> Process.monitor(state.conn_pid)