File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ # v2.5.2
8
+
9
+ Non-Breaking Internal Changes. (This shouldn't affect anyone.)
7
10
8
11
# v2.5.0
9
12
Original file line number Diff line number Diff line change 22
22
SOFTWARE.
23
23
"""
24
24
25
- __version__ = '2.5.1 '
25
+ __version__ = '2.5.2 '
26
26
27
27
import asyncio
28
28
import textwrap
@@ -61,6 +61,7 @@ def __init__(self):
61
61
self .threads = ThreadManager (self )
62
62
self .session = aiohttp .ClientSession (loop = self .loop )
63
63
self .config = ConfigManager (self )
64
+ self .config_ready = asyncio .Event ()
64
65
self .selfhosted = bool (self .config .get ('mongo_uri' ))
65
66
if self .selfhosted :
66
67
self .db = AsyncIOMotorClient (self .config .mongo_uri ).modmail_bot
@@ -177,6 +178,7 @@ async def on_connect(self):
177
178
print (Fore .CYAN + 'Connected to gateway.' )
178
179
179
180
await self .config .refresh ()
181
+ self .config_ready .set ()
180
182
181
183
activity_type = self .config .get ('activity_type' )
182
184
message = self .config .get ('activity_message' )
@@ -203,6 +205,8 @@ async def on_ready(self):
203
205
print (Fore .RED + Style .BRIGHT + 'WARNING - The GUILD_ID provided does not exist!' + Style .RESET_ALL )
204
206
else :
205
207
await self .threads .populate_cache ()
208
+
209
+ await self .config_ready .wait () # Wait until config cache is popluated with stuff from db
206
210
207
211
closures = self .config .closures .copy ()
208
212
You can’t perform that action at this time.
0 commit comments