Skip to content

Commit

Permalink
Add EmbedCreator cog (#220)
Browse files Browse the repository at this point in the history
* [EmbedCreator] Initial commit (needs more testing)

* Various fixes, send button, proper boolean checks

* Use view=None instead of removing items and passing self

* Add note to info.json

* Fixes in uploading JSON

* Much improve embed sending interaction

* Add `@commands.mod()` decorator

* Improve button layout and JSON handling

* Use Select for embed field removing, add clear button

* Style

* Update DEFAULT_EMBED_DESCRIPTION

* Update info.json + docs

* Final adjustments

* Style
  • Loading branch information
Kreusada committed Jun 1, 2023
1 parent 84f6592 commit 433f5c5
Show file tree
Hide file tree
Showing 8 changed files with 827 additions and 0 deletions.
1 change: 1 addition & 0 deletions cogs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Cog Name,Description,Tags,Authors
BlackFormatter,Style your code with the Black formatter,Tools,Kreusada
CogPaths,Get various paths for a cog.,"Tools, Informative",Kreusada
ConsoleClearer,Completely clear your Red console,Tools,Kreusada
EmbedCreator,"Create embeds using buttons, modals and dropdowns!",Tools,Kreusada
Flags,Get the flag for a country,Tools,Kreusada
Minifier,Minify your code with python minifier,Tools,Kreusada
OnThisDay,"Find out what happened today, in multiple different years in history.",Fun,Kreusada
Expand Down
68 changes: 68 additions & 0 deletions docs/cog_embedcreator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _embedcreator:

============
EmbedCreator
============

This is the cog guide for the 'EmbedCreator' cog. This guide
contains the collection of commands which you can use in the cog.

Through this guide, ``[p]`` will always represent your prefix. Replace
``[p]`` with your own prefix when you use these commands in Discord.

.. note::

This guide was last updated for version 1.0.0. Ensure
that you are up to date by running ``[p]cog update embedcreator``.

If there is something missing, or something that needs improving
in this documentation, feel free to create an issue `here <https://github.com/Kreusada/Kreusada-Cogs/issues>`_.

This documentation is auto-generated everytime this cog receives an update.

--------------
About this cog
--------------

Create embeds using buttons, modals and dropdowns!

--------
Commands
--------

Here are all the commands included in this cog (1):

* ``[p]embedcreate [embed_message=None]``
Create an embed.

------------
Installation
------------

If you haven't added my repo before, lets add it first. We'll call it
"kreusada-cogs" here.

.. code-block:: ini
[p]repo add kreusada-cogs https://github.com/Kreusada/Kreusada-Cogs
Now, we can install EmbedCreator.

.. code-block:: ini
[p]cog install kreusada-cogs embedcreator
Once it's installed, it is not loaded by default. Load it by running the following
command:

.. code-block:: ini
[p]load embedcreator
---------------
Further Support
---------------

For more support, head over to the `cog support server <https://discord.gg/GET4DVk>`_,
I have my own channel over there at #support_kreusada-cogs. Feel free to join my
`personal server <https://discord.gg/JmCFyq7>`_ whilst you're here.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Useful Links
cog_blackformatter
cog_cogpaths
cog_consoleclearer
cog_embedcreator
cog_flags
cog_minifier
cog_onthisday
Expand Down
68 changes: 68 additions & 0 deletions embedcreator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _embedcreator:

============
EmbedCreator
============

This is the cog guide for the 'EmbedCreator' cog. This guide
contains the collection of commands which you can use in the cog.

Through this guide, ``[p]`` will always represent your prefix. Replace
``[p]`` with your own prefix when you use these commands in Discord.

.. note::

This guide was last updated for version 1.0.0. Ensure
that you are up to date by running ``[p]cog update embedcreator``.

If there is something missing, or something that needs improving
in this documentation, feel free to create an issue `here <https://github.com/Kreusada/Kreusada-Cogs/issues>`_.

This documentation is auto-generated everytime this cog receives an update.

--------------
About this cog
--------------

Create embeds using buttons, modals and dropdowns!

--------
Commands
--------

Here are all the commands included in this cog (1):

* ``[p]embedcreate [embed_message=None]``
Create an embed.

------------
Installation
------------

If you haven't added my repo before, lets add it first. We'll call it
"kreusada-cogs" here.

.. code-block:: ini
[p]repo add kreusada-cogs https://github.com/Kreusada/Kreusada-Cogs
Now, we can install EmbedCreator.

.. code-block:: ini
[p]cog install kreusada-cogs embedcreator
Once it's installed, it is not loaded by default. Load it by running the following
command:

.. code-block:: ini
[p]load embedcreator
---------------
Further Support
---------------

For more support, head over to the `cog support server <https://discord.gg/GET4DVk>`_,
I have my own channel over there at #support_kreusada-cogs. Feel free to join my
`personal server <https://discord.gg/JmCFyq7>`_ whilst you're here.
10 changes: 10 additions & 0 deletions embedcreator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from .embedcreator import EmbedCreator

from redbot.core.bot import Red
from redbot.core.utils import get_end_user_data_statement

__red_end_user_data_statement__ = get_end_user_data_statement(__file__)


async def setup(bot: Red):
await bot.add_cog(EmbedCreator(bot))
Loading

0 comments on commit 433f5c5

Please sign in to comment.