File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -589,6 +589,36 @@ async def edit(
589
589
data = await self ._state .http .edit_channel (self .id , ** payload )
590
590
# The data payload will always be a Thread payload
591
591
return Thread (data = data , state = self ._state , guild = self .guild ) # type: ignore
592
+
593
+ async def archive (self , locked : bool = MISSING ) -> Thread :
594
+ """|coro|
595
+
596
+ Archives the thread. This is a shorthand of :meth:`.edit`.
597
+
598
+ Parameters
599
+ ------------
600
+ locked: :class:`bool`
601
+ Whether to lock the thread on archive, Defaults to ``False``.
602
+
603
+
604
+ Returns
605
+ --------
606
+ :class:`.Thread`
607
+ The updated thread.
608
+ """
609
+ return await self .edit (archived = True , locked = locked )
610
+
611
+ async def unarchive (self ) -> Thread :
612
+ """|coro|
613
+
614
+ Unarchives the thread. This is a shorthand of :meth:`.edit`.
615
+
616
+ Returns
617
+ --------
618
+ :class:`.Thread`
619
+ The updated thread.
620
+ """
621
+ return await self .edit (archived = False )
592
622
593
623
async def join (self ):
594
624
"""|coro|
You can’t perform that action at this time.
0 commit comments