Skip to main content

discord.Embed's extensions

Project description

※適当に作ったモジュールのため、バグが発生する可能性があります。もしバグが発生した場合、Discord(Req van Astraea#9732)もしくはTwitter(@Req_fn)までご連絡ください。※

追加されるもの

追加される関数

make - 指定された引数をもとにdiscord.Embedを作成し、返す
author_dict - makeコマンド等でauthorを指定する時にdictの作成を補助する
footer_dict - makeコマンド等でfooterを指定する時にdictの作成を補助する
field_dict - makeコマンド等でfieldを指定する時にdictの作成を補助する

追加されるメソッド

edit - 指定された引数をもとにdiscord.Embed情報を編集する
multiple_add_fields - 一度に複数のfieldを追加する
multiple_remove_fields - 一度に複数のfieldを削除する

各関数、メソッドの使い方

make()

discord_embed_extensions.make(**kwargs)  

Attributes

author
color
description
fields
footer
image
thumbnail
title
url

title

title='title'
Type: str

description

description='description'
Type: str

url

url='url'
Type: str

color

color=color
Type: Union[Colour, int]

footer

footer={'text': 'text', 'icon_url': 'icon_url'}
footer=footer_dict(*, text='text', icon_url='icon_url')
Parameters
・text(str)
・icon_url(str)

image

image='url'
Type: str

thumbnail

thumbnail='url'
Type: str

author

author={'name': 'name', 'url': 'url', 'icon_url': 'icon_url'}
author=author_dict(*, name='name', url='url', icon_url='icon_url')
Parameters
・name(str)
・url(str)
・icon_url(str)

fields

fields=[{'name': 'name', 'value': 'value', 'inline': bool}, {'name': 'name', 'value': 'value', 'inline': bool}]
fields=[field_dict(*, name='name', value='value', inline=bool), field_dict(*, name='name', value='value', inline=bool)]
Parameters
・name(str)
・value(str)
・inline(bool) - default: True

author_dict()

author = discord_embed_extensions.author_dict(**kwargs)  

Attributes

name
url
icon_url

name

name='name'
Type: str

url

url='url'
Type: str

icon_url

icon_url='icon_url'
Type: str

footer_dict()

footer = discord_embed_extensions.footer_dict(**kwargs)  

Attributes

text
icon_url

text

text='text'
Type: str

icon_url

icon_url='icon_url'
Type: str

field_dict()

field = discord_embed_extensions.field_dict(**kwargs)  

Attributes

name
value
inline

name

name='name'
Type: str

value

value='value'
Type: str

inline

inline=[True / False]
Type: bool

edit()

discord.Embed.edit(**kwargs)  

Attributes

author
color
description
footer
image
thumbnail
title
url

title

title='title'
Type: str

description

description='description'
Type: str

url

url='url'
Type: str

color

color=color
Type: Union[Colour, int]

footer

footer={'text': 'text', 'icon_url': 'icon_url'}
footer=footer_dict(*, text='text', icon_url='icon_url')

Parameters
・text(str)
・icon_url(str)

image

image='url'
Type: str

thumbnail

thumbnail='url'
Type: str

author

author={'name': 'name', 'url': 'url', 'icon_url': 'icon_url'}
author=author_dict(*, name='name', url='url', icon_url='icon_url')
Parameters
・name(str)
・url(str)
・icon_url(str)

multiple_add_fields()

discord.Embed.multiple_add_fields(fields)  

Parameters
 fields(dict in list) - makeコマンドと同じ指定方法

.multiple_add_fields([{'name': 'name', 'value': 'value', 'inline': bool}, {'name': 'name', 'value': 'value', 'inline': bool}])
.multiple_add_fields([field_dict(*, name='name', value='value', inline=bool), field_dict(*, name='name', value='value', inline=bool)])

multiple_remove_fields()

インデックスの大きいほうから削除されていくため、インデックスの補完について考える必要はありません

discord.Embed.multiple_remove_fields(indexes)  

Parameters
 indexes(list) - 要素はすべてint、順不同
.multiple_remove_fields([2, 4, 3, 1])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_embed_extensions-1.0.13-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file discord_embed_extensions-1.0.13-py3-none-any.whl.

File metadata

  • Download URL: discord_embed_extensions-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for discord_embed_extensions-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 2ed378ba8f9c36f240eacf312151ae8cb96ae890a8b78ba105f29fd49c8c89fe
MD5 a260dbfb9259fca987b4541236690d11
BLAKE2b-256 83ed0ec3905601084d454319403ec1f6de32f8d109ee017534b646245efd593e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page