Skip to content

Commit d9c884e

Browse files
committed
dpy-ecb2cf & Fix plugins not loading, resolve #3141
1 parent fa718e4 commit d9c884e

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pylint = "~=2.9.3"
1111
[packages]
1212
aiohttp = "==3.7.4.post0"
1313
colorama = "~=0.4.4" # Doesn't officially support Python 3.9 yet, v0.4.5 will support 3.9
14-
"discord.py" = {ref = "97fe07edb2f3d0f5a980917fb6ee479bf396fd94", git = "https://github.com/Rapptz/discord.py.git"}
14+
"discord.py" = {ref = "987235d5649e7c2b1a927637bab6547244ecb2cf", git = "https://github.com/Rapptz/discord.py.git"}
1515
emoji = "~=1.2.0"
1616
isodate = "~=0.6.0"
1717
motor = "~=2.4.0"

bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.0.0-dev7"
1+
__version__ = "4.0.0-dev8"
22

33

44
import asyncio
@@ -189,6 +189,7 @@ async def get_prefix(self, message=None):
189189
def run(self):
190190
async def runner():
191191
async with self:
192+
self.session = ClientSession(loop=self.loop)
192193
try:
193194
retry_intents = False
194195
try:
@@ -496,7 +497,6 @@ async def on_connect(self):
496497
await self.config.refresh()
497498
await self.api.setup_indexes()
498499
await self.load_extensions()
499-
self.session = ClientSession(loop=self.loop)
500500
self._connected.set()
501501

502502
async def on_ready(self):

cogs/plugins.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __init__(self, bot):
123123
self.loaded_plugins = set()
124124
self._ready_event = asyncio.Event()
125125

126-
async def async_init(self):
126+
async def cog_load(self):
127127
await self.populate_registry()
128128
if self.bot.config.get("enable_plugins"):
129129
await self.initial_load_plugins()
@@ -136,8 +136,6 @@ async def populate_registry(self):
136136
self.registry = json.loads(await resp.text())
137137

138138
async def initial_load_plugins(self):
139-
await self.bot.wait_for_connected()
140-
141139
for plugin_name in list(self.bot.config["plugins"]):
142140
try:
143141
plugin = Plugin.from_string(plugin_name, strict=True)

cogs/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def __init__(self, bot):
260260
self.eval_.enabled = False
261261
logger.info("Eval disabled. enable_eval=False")
262262

263-
async def async_init(self):
263+
async def cog_load(self):
264264
self.loop_presence.start() # pylint: disable=no-member
265265

266266
def cog_unload(self):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extend-exclude = '''
2121

2222
[tool.poetry]
2323
name = 'Modmail'
24-
version = '4.0.0-dev7'
24+
version = '4.0.0-dev8'
2525
description = "Modmail is similar to Reddit's Modmail, both in functionality and purpose. It serves as a shared inbox for server staff to communicate with their users in a seamless way."
2626
license = 'AGPL-3.0-only'
2727
authors = [

0 commit comments

Comments
 (0)