@@ -39,15 +39,15 @@ def __init__(self, bot):
3939 )
4040
4141 # Get Beacon
42- self .beacon : beacon .Beacon = self .bot .shared_objects .get ("beacon" )
42+ self ._beacon : beacon .Beacon = self .bot .shared_objects .get ("beacon" )
4343
4444 # Check if driver is already initialized
45- if "discord" in self .beacon .drivers .platforms :
45+ if "discord" in self ._beacon .drivers .platforms :
4646 return
4747
4848 # Register driver
49- self .beacon .drivers .register_driver ("discord" , discord_driver .DiscordDriver (
50- self .bot , self .beacon .messages
49+ self ._beacon .drivers .register_driver ("discord" , discord_driver .DiscordDriver (
50+ self .bot , self ._beacon .messages
5151 ))
5252
5353 async def _to_beacon_content (self , message : discord .Message ) -> beacon_message .BeaconMessageContent :
@@ -95,9 +95,9 @@ async def _to_beacon_content(self, message: discord.Message) -> beacon_message.B
9595 # Add reply if it exists
9696 replies : list [beacon_message .BeaconMessageGroup ] = []
9797 if message .reference :
98- reply_group : beacon_message . BeaconMessageGroup = self ._beacon .messages .get_group_from_message (
98+ replies = [ self ._beacon .messages .get_group_from_message (
9999 str (message .reference .message_id )
100- )
100+ )]
101101
102102 # If the message is cached, overwrite its content
103103 # If the Discord message object isn't cached, the driver can fetch that for us later
@@ -157,7 +157,7 @@ async def _get_attachment_data(attachment: discord.Attachment) -> beacon_file.Be
157157
158158 @commands .Cog .listener ()
159159 async def on_message (self , message : discord .Message ):
160- origin_driver : beacon_driver .BeaconDriver = self .beacon .drivers .get_driver ("discord" )
160+ origin_driver : beacon_driver .BeaconDriver = self ._beacon .drivers .get_driver ("discord" )
161161
162162 if message .author .id == self .bot .user .id :
163163 # Do not self-bridge
@@ -192,14 +192,14 @@ async def on_message(self, message: discord.Message):
192192 channel : beacon_channel .BeaconChannel = origin_driver .get_channel (server , str (message .channel .id ))
193193
194194 # Get Space
195- space : beacon_space .BeaconSpace = self .beacon .spaces .get_space_for_channel (channel )
195+ space : beacon_space .BeaconSpace = self ._beacon .spaces .get_space_for_channel (channel )
196196
197197 if not space :
198198 # We can't bridge
199199 return
200200
201201 # Run preliminary checks
202- preliminary_block : beacon .BeaconMessageBlockedReason | None = await self .beacon .can_send (
202+ preliminary_block : beacon .BeaconMessageBlockedReason | None = await self ._beacon .can_send (
203203 author = author ,
204204 space = space ,
205205 content = content ,
@@ -211,7 +211,7 @@ async def on_message(self, message: discord.Message):
211211 return
212212
213213 # Send message!
214- await self .beacon .send (
214+ await self ._beacon .send (
215215 author = author ,
216216 space = space ,
217217 content = content
0 commit comments