1212from metricity .bot import Bot
1313from metricity .config import BotConfig
1414from metricity .database import async_session
15- from metricity .exts .event_listeners import _utils
15+ from metricity .exts .event_listeners import _syncer_utils
1616
1717log = logging .get_logger (__name__ )
1818
@@ -29,10 +29,10 @@ async def sync_guild(self) -> None:
2929 await self .bot .wait_until_guild_available ()
3030
3131 guild = self .bot .get_guild (self .bot .guild_id )
32- await self .sync_channels (guild )
32+ await _syncer_utils .sync_channels (self . bot , guild )
3333
3434 log .info ("Beginning thread archive state synchronisation process" )
35- await self .sync_thread_archive_state (guild )
35+ await _syncer_utils .sync_thread_archive_state (guild )
3636
3737 log .info ("Beginning user synchronisation process" )
3838 async with async_session () as sess :
@@ -210,15 +210,15 @@ async def on_guild_channel_create(self, channel: discord.abc.GuildChannel) -> No
210210 if channel .guild .id != BotConfig .guild_id :
211211 return
212212
213- await self .sync_channels (channel .guild )
213+ await _syncer_utils .sync_channels (self . bot , channel .guild )
214214
215215 @commands .Cog .listener ()
216216 async def on_guild_channel_delete (self , channel : discord .abc .GuildChannel ) -> None :
217217 """Set the deleted flag to true when a channel is deleted."""
218218 if channel .guild .id != BotConfig .guild_id :
219219 return
220220
221- await self .sync_channels (channel .guild )
221+ await _syncer_utils .sync_channels (self . bot , channel .guild )
222222
223223 @commands .Cog .listener ()
224224 async def on_guild_channel_update (
@@ -230,23 +230,23 @@ async def on_guild_channel_update(
230230 if channel .guild .id != BotConfig .guild_id :
231231 return
232232
233- await self .sync_channels (channel .guild )
233+ await _syncer_utils .sync_channels (self . bot , channel .guild )
234234
235235 @commands .Cog .listener ()
236236 async def on_thread_create (self , thread : discord .Thread ) -> None :
237237 """Sync channels when a thread is created."""
238238 if thread .guild .id != BotConfig .guild_id :
239239 return
240240
241- await self .sync_channels (thread .guild )
241+ await _syncer_utils .sync_channels (self . bot , thread .guild )
242242
243243 @commands .Cog .listener ()
244244 async def on_thread_update (self , _before : discord .Thread , thread : discord .Thread ) -> None :
245245 """Sync the channels when one is updated."""
246246 if thread .guild .id != BotConfig .guild_id :
247247 return
248248
249- await self .sync_channels (thread .guild )
249+ await _syncer_utils .sync_channels (self . bot , thread .guild )
250250
251251 @commands .Cog .listener ()
252252 async def on_guild_available (self , guild : discord .Guild ) -> None :
0 commit comments