Страницы по рекции disnake
Project description
Параметры
| Имя | Тип | По умолчанию | Информация |
|---|---|---|---|
| ctx | discord.Client discord.ext.commands.Bot |
||
| message | discord.Message |
Сообщение с вашим embeds | |
| embeds | list |
None |
Список embeds |
timeout <optional> |
int |
30секунд |
Таймер работы Paginator |
use_more <optional> |
bool |
False |
Добавление 2/4 реакций (По умолчанию 2) |
use_exit <optional> |
bool |
False |
Добавление реакции для отключения Paginator |
delete_message <optional> |
bool |
False |
Удалить Paginator по истечении таймера(если False, то уберет реакции) |
only <optional> |
discord.abc.User |
None |
Автор использующий команду (ctx.author) |
time_stamp <optional> |
bool |
False |
Добавление времени вызова команды (timestamp) |
footer <optional> |
bool |
True |
Вкл./откл. footer (Подпись Раздел-Страница) |
reactions <optional> |
list |
["⬅", "➡"] | Можно стандартные смайлики поменять на свои (['👀', '<:bot:673508314008649749>'] |
more_reactions <optional> |
list |
["⬅", "➡", "⏪", "⏩"] | Можно стандартные смайлики поменять на свои |
exit_reaction <optional> |
list |
["⏹"] | Можно стандартный смайлик поменять на свой |
language <optional> |
str |
ru |
Выбор языка (ru, en) |
color <optional> |
int |
None |
Можно установить 1 цвет на все страницы, HEX (0x000000) |
footer_icon <optional> |
str |
None |
URL-адрес значка нижнего колонтитула. Поддерживается только HTTP(S). |
use_remove_reaction <optional> |
bool |
True |
Отключает remove_reaction, пользовател будет сам убирать ркации. (Стоит ставить если боту запретили права на сервере) |
Примеры использования
- С 2'мя реакциями
import discord
from discord.ext import commands
from Cybernator import Paginator
bot = commands.Bot(command_prefix="%")
@bot.command()
async def test(ctx):
embed1 = discord.Embed(title="Страница 1", description='test 1')
embed2 = discord.Embed(title="Страница 2", description='test 2')
embed3 = discord.Embed(title="Страница 3", description='test 3')
embed4 = discord.Embed(title="Страница 4", description='test 4')
embeds = [embed1, embed2, embed3, embed4]
message = await ctx.send(embed=embed1)
page = Paginator(bot, message, only=ctx.author, use_more=False, embeds=embeds)
await page.start()
bot.run(token)
- С 4'мя реакциями
import discord
from discord.ext import commands
from Cybernator import Paginator
bot = commands.Bot(command_prefix="%")
@bot.command()
async def test(ctx):
embed1 = discord.Embed(title="Страница 1", description='test 1')
embed21 = discord.Embed(title="Страница 2.1", description='test 2.1')
embed22 = discord.Embed(title="Страница 2.2", description='test 2.2')
embed31 = discord.Embed(title="Страница 3.1", description='test 3.1')
embed32 = discord.Embed(title="Страница 3.2", description='test 3.2')
embed33 = discord.Embed(title="Страница 3.3", description='test 3.3')
embed34 = discord.Embed(title="Страница 3.4", description='test 3.4')
embeds = [embed1, [embed21, embed22], [embed31, embed32, embed33, embed34]]
message = await ctx.send(embed=embed1)
page = Paginator(bot, message, only=ctx.author, use_more=True, embeds=embeds)
await page.start()
bot.run(token)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Cyberdisnake-1.0.0.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Cyberdisnake-1.0.0.tar.gz.
File metadata
- Download URL: Cyberdisnake-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d02aca900c0a1cdd6425893100c204ef62999caa69afd27c39f010b976eced8
|
|
| MD5 |
067a87f9b8a91c186f58b1eae9db616a
|
|
| BLAKE2b-256 |
b70db21b5a12500dff830d1ab5ec5bd52103db527e0276edf0e1870c4cb6fd54
|
File details
Details for the file Cyberdisnake-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Cyberdisnake-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
896849991a348a839964dd8feb4b665fd4e3b84ae6fb423dd8da33620bc7dc0c
|
|
| MD5 |
d4c77ab21f1ca61c614b025b45039c9e
|
|
| BLAKE2b-256 |
f80fec832fbe2f64b50c25bd36f10c68adb61d50007ad0963bcec23f27e6aac7
|