or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

application-commands.mdautomod.mdchannels-messaging.mdclient-bot.mdcommand-framework.mderror-handling.mdevents-gateway.mdguild-management.mdindex.mdinteractions-ui.mdlocalization-i18n.mdpermissions-security.mdpolls.mdusers-members.mdvoice-audio.md

channels-messaging.mddocs/

0

# Channels and Messaging

1

2

Comprehensive channel types and messaging functionality supporting all Discord channel types including text channels, voice channels, threads, forums, and direct messages. Includes full message management with rich content support.

3

4

## Capabilities

5

6

### Text Channels

7

8

Guild text channels for message-based communication with full message history and permission management.

9

10

```python { .api }

11

class TextChannel:

12

def __init__(self): ...

13

14

id: int

15

name: str

16

guild: Guild

17

position: int

18

topic: Optional[str]

19

category: Optional[CategoryChannel]

20

slowmode_delay: int

21

nsfw: bool

22

default_auto_archive_duration: int

23

permissions_synced: bool

24

25

async def send(

26

self,

27

content: Optional[str] = None,

28

*,

29

tts: bool = False,

30

embed: Optional[Embed] = None,

31

embeds: Optional[List[Embed]] = None,

32

file: Optional[File] = None,

33

files: Optional[List[File]] = None,

34

allowed_mentions: Optional[AllowedMentions] = None,

35

reference: Optional[Union[Message, MessageReference, PartialMessage]] = None,

36

mention_author: Optional[bool] = None,

37

view: Optional[View] = None,

38

components: Optional[Union[ActionRow, List[ActionRow], List[List[Component]], List[Component]]] = None,

39

delete_after: Optional[float] = None,

40

suppress_embeds: bool = False,

41

flags: Optional[MessageFlags] = None

42

) -> Message:

43

"""

44

Send a message to this channel.

45

46

Parameters:

47

- content: Message text content

48

- tts: Whether message should be read with text-to-speech

49

- embed: Single embed to include

50

- embeds: List of embeds to include (max 10)

51

- file: Single file to attach

52

- files: List of files to attach (max 10)

53

- allowed_mentions: Controls @ mentions in the message

54

- reference: Message to reply to

55

- mention_author: Whether to mention the author when replying

56

- view: UI components view

57

- components: Raw components to include

58

- delete_after: Seconds after which to delete the message

59

- suppress_embeds: Whether to suppress embeds

60

- flags: Message flags

61

62

Returns:

63

The sent message

64

"""

65

66

async def fetch_message(self, id: int) -> Message:

67

"""

68

Fetch a specific message by ID.

69

70

Parameters:

71

- id: Message ID

72

73

Returns:

74

Message object

75

"""

76

77

def get_partial_message(self, message_id: int) -> PartialMessage:

78

"""

79

Create a partial message object for API calls.

80

81

Parameters:

82

- message_id: Message ID

83

84

Returns:

85

Partial message object

86

"""

87

88

def history(

89

self,

90

*,

91

limit: Optional[int] = 100,

92

before: Optional[Union[Snowflake, datetime]] = None,

93

after: Optional[Union[Snowflake, datetime]] = None,

94

around: Optional[Union[Snowflake, datetime]] = None,

95

oldest_first: Optional[bool] = None

96

) -> AsyncIterator[Message]:

97

"""

98

Iterate through message history.

99

100

Parameters:

101

- limit: Maximum messages to retrieve

102

- before: Retrieve messages before this message/time

103

- after: Retrieve messages after this message/time

104

- around: Retrieve messages around this message/time

105

- oldest_first: Whether to return oldest messages first

106

107

Returns:

108

Async iterator of messages

109

"""

110

111

async def purge(

112

self,

113

*,

114

limit: int = 100,

115

check: Optional[Callable[[Message], bool]] = None,

116

before: Optional[Union[Snowflake, datetime]] = None,

117

after: Optional[Union[Snowflake, datetime]] = None,

118

around: Optional[Union[Snowflake, datetime]] = None,

119

oldest_first: Optional[bool] = False,

120

bulk: Optional[bool] = True,

121

reason: Optional[str] = None

122

) -> List[Message]:

123

"""

124

Bulk delete messages from the channel.

125

126

Parameters:

127

- limit: Maximum messages to delete

128

- check: Function to check if message should be deleted

129

- before: Delete messages before this message/time

130

- after: Delete messages after this message/time

131

- around: Delete messages around this message/time

132

- oldest_first: Whether to delete oldest messages first

133

- bulk: Whether to use bulk delete API

134

- reason: Reason for deletion (audit log)

135

136

Returns:

137

List of deleted messages

138

"""

139

140

async def create_thread(

141

self,

142

*,

143

name: str,

144

message: Optional[Message] = None,

145

auto_archive_duration: Optional[int] = None,

146

type: Optional[ChannelType] = None,

147

reason: Optional[str] = None

148

) -> Thread:

149

"""

150

Create a thread in this channel.

151

152

Parameters:

153

- name: Thread name

154

- message: Message to create thread from (optional)

155

- auto_archive_duration: Thread auto-archive duration

156

- type: Thread type

157

- reason: Reason for creation (audit log)

158

159

Returns:

160

Created thread

161

"""

162

163

async def edit(

164

self,

165

*,

166

name: Optional[str] = None,

167

topic: Optional[str] = None,

168

position: Optional[int] = None,

169

nsfw: Optional[bool] = None,

170

sync_permissions: Optional[bool] = None,

171

category: Optional[CategoryChannel] = None,

172

slowmode_delay: Optional[int] = None,

173

type: Optional[ChannelType] = None,

174

default_auto_archive_duration: Optional[int] = None,

175

overwrites: Optional[Dict[Union[Role, Member], PermissionOverwrite]] = None,

176

reason: Optional[str] = None

177

) -> Optional[TextChannel]:

178

"""

179

Edit channel properties.

180

181

Parameters:

182

- name: New channel name

183

- topic: New channel topic

184

- position: New channel position

185

- nsfw: Whether channel is NSFW

186

- sync_permissions: Whether to sync with category permissions

187

- category: Channel category

188

- slowmode_delay: Slowmode delay in seconds

189

- type: Channel type

190

- default_auto_archive_duration: Default thread archive duration

191

- overwrites: Permission overwrites

192

- reason: Reason for edit (audit log)

193

194

Returns:

195

Updated channel

196

"""

197

```

198

199

### Voice Channels

200

201

Guild voice channels for voice and video communication with connection management.

202

203

```python { .api }

204

class VoiceChannel:

205

def __init__(self): ...

206

207

id: int

208

name: str

209

guild: Guild

210

position: int

211

category: Optional[CategoryChannel]

212

bitrate: int

213

user_limit: int

214

rtc_region: Optional[str]

215

video_quality_mode: VideoQualityMode

216

members: List[Member]

217

218

async def connect(

219

self,

220

*,

221

timeout: float = 60.0,

222

reconnect: bool = True,

223

cls: Type[VoiceProtocol] = VoiceClient

224

) -> VoiceClient:

225

"""

226

Connect to this voice channel.

227

228

Parameters:

229

- timeout: Connection timeout

230

- reconnect: Whether to reconnect on disconnect

231

- cls: Voice client class to use

232

233

Returns:

234

Voice client connection

235

"""

236

237

async def edit(

238

self,

239

*,

240

name: Optional[str] = None,

241

bitrate: Optional[int] = None,

242

user_limit: Optional[int] = None,

243

position: Optional[int] = None,

244

sync_permissions: Optional[bool] = None,

245

category: Optional[CategoryChannel] = None,

246

overwrites: Optional[Dict[Union[Role, Member], PermissionOverwrite]] = None,

247

rtc_region: Optional[Union[str, VoiceRegion]] = None,

248

video_quality_mode: Optional[VideoQualityMode] = None,

249

reason: Optional[str] = None

250

) -> Optional[VoiceChannel]:

251

"""

252

Edit voice channel properties.

253

254

Parameters:

255

- name: New channel name

256

- bitrate: Audio bitrate (8000-384000)

257

- user_limit: Maximum users (0 for unlimited)

258

- position: New channel position

259

- sync_permissions: Whether to sync with category permissions

260

- category: Channel category

261

- overwrites: Permission overwrites

262

- rtc_region: Voice region

263

- video_quality_mode: Video quality mode

264

- reason: Reason for edit (audit log)

265

266

Returns:

267

Updated channel

268

"""

269

```

270

271

### Stage Channels

272

273

Special voice channels designed for stage events and presentations.

274

275

```python { .api }

276

class StageChannel:

277

def __init__(self): ...

278

279

id: int

280

name: str

281

guild: Guild

282

topic: Optional[str]

283

bitrate: int

284

user_limit: int

285

rtc_region: Optional[str]

286

287

async def create_instance(

288

self,

289

*,

290

topic: str,

291

privacy_level: Optional[StagePrivacyLevel] = None,

292

reason: Optional[str] = None

293

) -> StageInstance:

294

"""

295

Create a stage instance for this channel.

296

297

Parameters:

298

- topic: Stage topic

299

- privacy_level: Privacy level for the stage

300

- reason: Reason for creation (audit log)

301

302

Returns:

303

Created stage instance

304

"""

305

306

@property

307

def instance(self) -> Optional[StageInstance]:

308

"""Current stage instance if active."""

309

```

310

311

### Direct Message Channels

312

313

Private channels for direct messaging between users.

314

315

```python { .api }

316

class DMChannel:

317

def __init__(self): ...

318

319

id: int

320

recipient: User

321

me: ClientUser

322

323

async def send(

324

self,

325

content: Optional[str] = None,

326

*,

327

tts: bool = False,

328

embed: Optional[Embed] = None,

329

embeds: Optional[List[Embed]] = None,

330

file: Optional[File] = None,

331

files: Optional[List[File]] = None,

332

allowed_mentions: Optional[AllowedMentions] = None,

333

reference: Optional[Union[Message, MessageReference, PartialMessage]] = None,

334

mention_author: Optional[bool] = None,

335

view: Optional[View] = None,

336

components: Optional[Union[ActionRow, List[ActionRow], List[List[Component]], List[Component]]] = None,

337

delete_after: Optional[float] = None,

338

suppress_embeds: bool = False,

339

flags: Optional[MessageFlags] = None

340

) -> Message:

341

"""Send a message to this DM channel."""

342

```

343

344

### Forum Channels

345

346

Forum-style channels with posts and threads for organized discussions.

347

348

```python { .api }

349

class ForumChannel:

350

def __init__(self): ...

351

352

id: int

353

name: str

354

guild: Guild

355

topic: Optional[str]

356

position: int

357

category: Optional[CategoryChannel]

358

slowmode_delay: int

359

nsfw: bool

360

default_auto_archive_duration: int

361

default_thread_slowmode_delay: int

362

available_tags: List[ForumTag]

363

default_reaction_emoji: Optional[Union[str, PartialEmoji]]

364

default_sort_order: Optional[ThreadSortOrder]

365

default_layout: ForumLayout

366

367

async def create_thread(

368

self,

369

*,

370

name: str,

371

content: Optional[str] = None,

372

embed: Optional[Embed] = None,

373

embeds: Optional[List[Embed]] = None,

374

file: Optional[File] = None,

375

files: Optional[List[File]] = None,

376

allowed_mentions: Optional[AllowedMentions] = None,

377

view: Optional[View] = None,

378

components: Optional[Union[ActionRow, List[ActionRow], List[List[Component]], List[Component]]] = None,

379

auto_archive_duration: Optional[int] = None,

380

slowmode_delay: Optional[int] = None,

381

applied_tags: Optional[List[ForumTag]] = None,

382

reason: Optional[str] = None

383

) -> Thread:

384

"""

385

Create a forum post (thread) with initial message.

386

387

Parameters:

388

- name: Thread/post name

389

- content: Initial message content

390

- embed: Single embed for initial message

391

- embeds: List of embeds for initial message

392

- file: Single file for initial message

393

- files: List of files for initial message

394

- allowed_mentions: Controls @ mentions

395

- view: UI components for initial message

396

- components: Raw components for initial message

397

- auto_archive_duration: Thread auto-archive duration

398

- slowmode_delay: Thread slowmode delay

399

- applied_tags: Forum tags to apply

400

- reason: Reason for creation (audit log)

401

402

Returns:

403

Created forum thread

404

"""

405

```

406

407

### Thread Channels

408

409

Thread channels for organized conversations branching from main channels.

410

411

```python { .api }

412

class Thread:

413

def __init__(self): ...

414

415

id: int

416

name: str

417

guild: Guild

418

parent: Optional[Union[TextChannel, ForumChannel]]

419

owner: Optional[Member]

420

slowmode_delay: int

421

message_count: int

422

member_count: int

423

archive_timestamp: Optional[datetime]

424

auto_archive_duration: int

425

archived: bool

426

locked: bool

427

invitable: bool

428

applied_tags: List[ForumTag]

429

430

async def edit(

431

self,

432

*,

433

name: Optional[str] = None,

434

archived: Optional[bool] = None,

435

auto_archive_duration: Optional[int] = None,

436

locked: Optional[bool] = None,

437

invitable: Optional[bool] = None,

438

slowmode_delay: Optional[int] = None,

439

applied_tags: Optional[List[ForumTag]] = None,

440

reason: Optional[str] = None

441

) -> Thread:

442

"""

443

Edit thread properties.

444

445

Parameters:

446

- name: New thread name

447

- archived: Whether thread is archived

448

- auto_archive_duration: Auto-archive duration

449

- locked: Whether thread is locked

450

- invitable: Whether non-moderators can add members

451

- slowmode_delay: Slowmode delay in seconds

452

- applied_tags: Forum tags (forum threads only)

453

- reason: Reason for edit (audit log)

454

455

Returns:

456

Updated thread

457

"""

458

459

async def add_user(self, user: Union[Member, User]) -> None:

460

"""

461

Add a user to this thread.

462

463

Parameters:

464

- user: User to add

465

"""

466

467

async def remove_user(self, user: Union[Member, User]) -> None:

468

"""

469

Remove a user from this thread.

470

471

Parameters:

472

- user: User to remove

473

"""

474

475

async def join(self) -> None:

476

"""Join this thread as the bot."""

477

478

async def leave(self) -> None:

479

"""Leave this thread as the bot."""

480

```

481

482

### Messages

483

484

Message objects representing individual messages with rich content support.

485

486

```python { .api }

487

class Message:

488

def __init__(self): ...

489

490

id: int

491

content: str

492

channel: Union[TextChannel, DMChannel, GroupChannel, Thread, VoiceChannel, StageChannel, ForumChannel, PartialMessageable]

493

author: Union[User, Member]

494

attachments: List[Attachment]

495

embeds: List[Embed]

496

mentions: List[Union[User, Member]]

497

channel_mentions: List[GuildChannel]

498

role_mentions: List[Role]

499

mention_everyone: bool

500

pinned: bool

501

tts: bool

502

type: MessageType

503

flags: MessageFlags

504

reference: Optional[MessageReference]

505

interaction: Optional[MessageInteraction]

506

thread: Optional[Thread]

507

components: List[ActionRow]

508

stickers: List[StickerItem]

509

created_at: datetime

510

edited_at: Optional[datetime]

511

512

async def edit(

513

self,

514

content: Optional[str] = None,

515

*,

516

embed: Optional[Embed] = None,

517

embeds: Optional[List[Embed]] = None,

518

attachments: Optional[List[Union[Attachment, File]]] = None,

519

view: Optional[View] = None,

520

components: Optional[Union[ActionRow, List[ActionRow], List[List[Component]], List[Component]]] = None,

521

allowed_mentions: Optional[AllowedMentions] = None,

522

delete_after: Optional[float] = None,

523

suppress_embeds: Optional[bool] = None,

524

flags: Optional[MessageFlags] = None

525

) -> Message:

526

"""

527

Edit this message.

528

529

Parameters:

530

- content: New message content

531

- embed: Single embed to replace existing embeds

532

- embeds: List of embeds to replace existing embeds

533

- attachments: List of attachments/files to replace existing attachments

534

- view: UI components view

535

- components: Raw components

536

- allowed_mentions: Controls @ mentions

537

- delete_after: Seconds after which to delete the message

538

- suppress_embeds: Whether to suppress embeds

539

- flags: Message flags

540

541

Returns:

542

Updated message

543

"""

544

545

async def delete(self, *, delay: Optional[float] = None, reason: Optional[str] = None) -> None:

546

"""

547

Delete this message.

548

549

Parameters:

550

- delay: Delay before deletion in seconds

551

- reason: Reason for deletion (audit log)

552

"""

553

554

async def pin(self, *, reason: Optional[str] = None) -> None:

555

"""

556

Pin this message.

557

558

Parameters:

559

- reason: Reason for pinning (audit log)

560

"""

561

562

async def unpin(self, *, reason: Optional[str] = None) -> None:

563

"""

564

Unpin this message.

565

566

Parameters:

567

- reason: Reason for unpinning (audit log)

568

"""

569

570

async def add_reaction(self, emoji: Union[Emoji, PartialEmoji, str]) -> None:

571

"""

572

Add a reaction to this message.

573

574

Parameters:

575

- emoji: Emoji to react with

576

"""

577

578

async def remove_reaction(self, emoji: Union[Emoji, PartialEmoji, str], member: Union[Member, User]) -> None:

579

"""

580

Remove a reaction from this message.

581

582

Parameters:

583

- emoji: Emoji reaction to remove

584

- member: User whose reaction to remove

585

"""

586

587

async def clear_reaction(self, emoji: Union[Emoji, PartialEmoji, str]) -> None:

588

"""

589

Clear all reactions of a specific emoji.

590

591

Parameters:

592

- emoji: Emoji reactions to clear

593

"""

594

595

async def clear_reactions(self) -> None:

596

"""Clear all reactions from this message."""

597

598

async def reply(

599

self,

600

content: Optional[str] = None,

601

*,

602

tts: bool = False,

603

embed: Optional[Embed] = None,

604

embeds: Optional[List[Embed]] = None,

605

file: Optional[File] = None,

606

files: Optional[List[File]] = None,

607

allowed_mentions: Optional[AllowedMentions] = None,

608

mention_author: Optional[bool] = None,

609

view: Optional[View] = None,

610

components: Optional[Union[ActionRow, List[ActionRow], List[List[Component]], List[Component]]] = None,

611

delete_after: Optional[float] = None,

612

suppress_embeds: bool = False,

613

flags: Optional[MessageFlags] = None

614

) -> Message:

615

"""

616

Reply to this message.

617

618

Parameters:

619

- content: Reply content

620

- tts: Whether reply should use text-to-speech

621

- embed: Single embed

622

- embeds: List of embeds

623

- file: Single file

624

- files: List of files

625

- allowed_mentions: Controls @ mentions

626

- mention_author: Whether to mention the original author

627

- view: UI components

628

- components: Raw components

629

- delete_after: Seconds after which to delete reply

630

- suppress_embeds: Whether to suppress embeds

631

- flags: Message flags

632

633

Returns:

634

Reply message

635

"""

636

637

def to_reference(self, *, fail_if_not_exists: bool = True) -> MessageReference:

638

"""

639

Create a message reference for replying.

640

641

Parameters:

642

- fail_if_not_exists: Whether to fail if message doesn't exist

643

644

Returns:

645

Message reference object

646

"""

647

```

648

649

### Embeds

650

651

Rich embed objects for formatted message content with multiple fields and media.

652

653

```python { .api }

654

class Embed:

655

def __init__(

656

self,

657

*,

658

title: Optional[str] = None,

659

type: str = 'rich',

660

description: Optional[str] = None,

661

url: Optional[str] = None,

662

timestamp: Optional[datetime] = None,

663

color: Optional[Union[int, Color]] = None,

664

colour: Optional[Union[int, Colour]] = None

665

):

666

"""

667

Create a rich embed.

668

669

Parameters:

670

- title: Embed title

671

- type: Embed type (usually 'rich')

672

- description: Embed description

673

- url: URL for embed title

674

- timestamp: Embed timestamp

675

- color: Embed color

676

- colour: Embed colour (alias for color)

677

"""

678

679

title: Optional[str]

680

type: str

681

description: Optional[str]

682

url: Optional[str]

683

timestamp: Optional[datetime]

684

color: Optional[Color]

685

fields: List[EmbedField]

686

footer: Optional[EmbedFooter]

687

image: Optional[EmbedMedia]

688

thumbnail: Optional[EmbedMedia]

689

video: Optional[EmbedMedia]

690

provider: Optional[EmbedProvider]

691

author: Optional[EmbedAuthor]

692

693

def add_field(self, *, name: str, value: str, inline: bool = True) -> Self:

694

"""

695

Add a field to the embed.

696

697

Parameters:

698

- name: Field name

699

- value: Field value

700

- inline: Whether field should be inline

701

702

Returns:

703

Self for method chaining

704

"""

705

706

def insert_field_at(self, index: int, *, name: str, value: str, inline: bool = True) -> Self:

707

"""

708

Insert a field at a specific index.

709

710

Parameters:

711

- index: Index to insert at

712

- name: Field name

713

- value: Field value

714

- inline: Whether field should be inline

715

716

Returns:

717

Self for method chaining

718

"""

719

720

def set_field_at(self, index: int, *, name: str, value: str, inline: bool = True) -> Self:

721

"""

722

Set a field at a specific index.

723

724

Parameters:

725

- index: Index to set

726

- name: Field name

727

- value: Field value

728

- inline: Whether field should be inline

729

730

Returns:

731

Self for method chaining

732

"""

733

734

def remove_field(self, index: int) -> None:

735

"""

736

Remove a field by index.

737

738

Parameters:

739

- index: Field index to remove

740

"""

741

742

def set_footer(self, *, text: str, icon_url: Optional[str] = None) -> Self:

743

"""

744

Set embed footer.

745

746

Parameters:

747

- text: Footer text

748

- icon_url: Footer icon URL

749

750

Returns:

751

Self for method chaining

752

"""

753

754

def set_image(self, *, url: str) -> Self:

755

"""

756

Set embed image.

757

758

Parameters:

759

- url: Image URL

760

761

Returns:

762

Self for method chaining

763

"""

764

765

def set_thumbnail(self, *, url: str) -> Self:

766

"""

767

Set embed thumbnail.

768

769

Parameters:

770

- url: Thumbnail URL

771

772

Returns:

773

Self for method chaining

774

"""

775

776

def set_author(self, *, name: str, url: Optional[str] = None, icon_url: Optional[str] = None) -> Self:

777

"""

778

Set embed author.

779

780

Parameters:

781

- name: Author name

782

- url: Author URL

783

- icon_url: Author icon URL

784

785

Returns:

786

Self for method chaining

787

"""

788

789

def clear_fields(self) -> None:

790

"""Remove all fields from the embed."""

791

792

def copy(self) -> Self:

793

"""Create a copy of this embed."""

794

795

def to_dict(self) -> Dict[str, Any]:

796

"""Convert embed to dictionary for API calls."""

797

```

798

799

## Usage Examples

800

801

### Sending Messages with Rich Content

802

803

```python

804

import disnake

805

806

channel = bot.get_channel(123456789)

807

808

# Simple text message

809

await channel.send("Hello, world!")

810

811

# Message with embed

812

embed = disnake.Embed(

813

title="Status Update",

814

description="Bot is now online!",

815

color=disnake.Color.green()

816

)

817

embed.add_field(name="Version", value="2.10.1", inline=True)

818

embed.add_field(name="Uptime", value="5 minutes", inline=True)

819

embed.set_footer(text="Powered by Disnake")

820

821

await channel.send(embed=embed)

822

823

# Message with file attachment

824

with open('image.png', 'rb') as f:

825

file = disnake.File(f, filename='screenshot.png')

826

await channel.send("Here's a screenshot:", file=file)

827

828

# Reply to a message

829

@bot.event

830

async def on_message(message):

831

if message.content == "!ping":

832

await message.reply("Pong!")

833

```

834

835

### Working with Message History

836

837

```python

838

# Get last 50 messages

839

async for message in channel.history(limit=50):

840

print(f"{message.author}: {message.content}")

841

842

# Purge messages from a specific user

843

def is_spam(message):

844

return message.author.id == 123456789 and len(message.content) < 5

845

846

deleted = await channel.purge(limit=100, check=is_spam)

847

print(f"Deleted {len(deleted)} spam messages")

848

849

# Fetch a specific message

850

message = await channel.fetch_message(987654321)

851

await message.edit(content="Updated content!")

852

```

853

854

### Thread Management

855

856

```python

857

# Create a thread from a message

858

message = await channel.send("Let's discuss this topic!")

859

thread = await message.create_thread(name="Discussion Thread")

860

861

# Create a standalone thread

862

thread = await channel.create_thread(

863

name="Announcements",

864

type=disnake.ChannelType.public_thread

865

)

866

867

# Join and manage thread

868

await thread.join()

869

await thread.add_user(member)

870

await thread.send("Welcome to the thread!")

871

872

# Archive thread

873

await thread.edit(archived=True)

874

```

875

876

### Forum Channel Posts

877

878

```python

879

# Create a forum post

880

forum_channel = bot.get_channel(123456789)

881

882

thread = await forum_channel.create_thread(

883

name="Bug Report: Login Issues",

884

content="I'm experiencing login problems...",

885

applied_tags=[bug_tag, priority_high_tag]

886

)

887

888

# Add reaction to the initial post

889

initial_message = await thread.fetch_message(thread.id)

890

await initial_message.add_reaction("๐Ÿ‘")

891

```