title: Using global state variables in coroutines?
body: <p>I'm building a discord bot using the discord.py library - all user interaction therefore necessarily takes place in coroutines, defined with async and called with await.</p>
  
  <p>One of my functions is going to require a saved state variable - a time offset used in a calculation that will occasionally need to be updated manually by users.</p>
  
  <p>I can't use a normal global variable in the main thread - the coroutines can't see them.  What's a sensible design pattern for preserving a state variable between multiple coroutines?</p>