@@ -190,6 +190,13 @@ async def send_recipient_genesis_message():
190
190
close_emoji = await self .bot .convert_emoji (close_emoji )
191
191
await self .bot .add_reaction (msg , close_emoji )
192
192
193
+ async def send_persistent_notes ():
194
+ notes = await self .bot .api .find_notes ()
195
+ for note in notes :
196
+ message = discord .Message ()
197
+ await self .note (note .message )
198
+ pass
199
+
193
200
await asyncio .gather (send_genesis_message (), send_recipient_genesis_message ())
194
201
self .bot .dispatch ("thread_ready" , self )
195
202
@@ -629,11 +636,11 @@ async def edit_dm_message(self, message: discord.Message, content: str) -> None:
629
636
self .bot .api .edit_message (message .id , content ), linked_message .edit (embed = embed )
630
637
)
631
638
632
- async def note (self , message : discord .Message ) -> None :
639
+ async def note (self , message : discord .Message , persistent = False ) -> None :
633
640
if not message .content and not message .attachments :
634
641
raise MissingRequiredArgument (SimpleNamespace (name = "msg" ))
635
642
636
- msg = await self .send (message , self .channel , note = True )
643
+ msg = await self .send (message , self .channel , note = True , persistent_note = persistent )
637
644
638
645
self .bot .loop .create_task (
639
646
self .bot .api .append_log (
@@ -719,6 +726,7 @@ async def send(
719
726
note : bool = False ,
720
727
anonymous : bool = False ,
721
728
plain : bool = False ,
729
+ persistent_note : bool = False ,
722
730
) -> None :
723
731
724
732
self .bot .loop .create_task (
@@ -780,7 +788,7 @@ async def send(
780
788
else :
781
789
# Special note messages
782
790
embed .set_author (
783
- name = f"Note ({ author .name } )" ,
791
+ name = f"{ 'Persistent' if persistent_note else '' } Note ({ author .name } )" ,
784
792
icon_url = system_avatar_url ,
785
793
url = f"https://discordapp.com/users/{ author .id } #{ message .id } " ,
786
794
)
0 commit comments