Miscewwanyeous

This section documents evewything in the commands e-extension that doesn’t fit i-i-into any othew section, but isn’t big enyough to have its own section.

Cwasses

Paginyatow

class disnake.ext.commands.Paginator(prefix='```', suffix='```', max_size=2000, linesep='\n')[source]

A cwass that aids in paginyating code bwocks fow Discowd messages.

len(x)

Wetuwns the totaw nyumbew of chawactews in the paginyatow.

prefix

The pwefix insewted to evewy page. e.g. thwee backticks.

Type:

Optionyaw[str]

suffix

The suffix appended at the end of evewy page. e.g. thwee backticks.

Type:

Optionyaw[str]

max_size

The maximum amount of codepoints awwowed in a page.

Type:

int

linesep

The chawactew stwing insewted between winyes. e.g. a nyewwinye chawactew.

Nyew in vewsion 1.7.

Type:

str

clear()[source]

Cweaws the paginyatow to have nyo pages.

add_line(line='', *, empty=False)[source]

Adds a winye to the cuwwent page.

If the winye exceeds the max_size then an exception is waised.

Pawametews:
  • winye (str) – The winye to add.

  • empty (bool) – Whethew anyothew empty winye shouwd be added.

Waises:

W-W-WuntimeEwwow – The winye was too big fow the cuwwent max_size.

close_page()[source]

Pwematuwewy tewminyate a page.

property pages[source]

W-W-Wetuwns the wendewed wist of pages.

Type:

Wist[str]