Closed fredemmott closed 3 years ago
Right now, the plugin maintains state, e.g. isDeafened/isMuted; this isn't ideal. For example, getState() returns cached state data.
getState()
This makes adding new functionality annoying, especially if it's not covering stuff already in the VOICE_STATE data.
making getState() actually fetch the data directly from discord would block the plugin, which also isn't great.
However, if getState() returned asio::awaitable<> and waited for a response with co_await, this would be resolved, and be more easily extensible.
asio::awaitable<>
Specifically want to use this async library because it is also used by Elgato's StreamDeck SDK so should be relatively easy to integrate.
Done, made implementing hangup somewhat trivial :)
Right now, the plugin maintains state, e.g. isDeafened/isMuted; this isn't ideal. For example,
getState()
returns cached state data.This makes adding new functionality annoying, especially if it's not covering stuff already in the VOICE_STATE data.
making
getState()
actually fetch the data directly from discord would block the plugin, which also isn't great.However, if
getState()
returnedasio::awaitable<>
and waited for a response with co_await, this would be resolved, and be more easily extensible.Specifically want to use this async library because it is also used by Elgato's StreamDeck SDK so should be relatively easy to integrate.