Skip to content

Commit

Permalink
[V3 Docs] Added InstantCMD to index
Browse files Browse the repository at this point in the history
  • Loading branch information
laggron42 committed May 23, 2018
1 parent c250508 commit 7a28049
Show file tree
Hide file tree
Showing 14 changed files with 369 additions and 6 deletions.
Binary file modified docs/.build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.build/html/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.build/html/.doctrees/instantcommands.doctree
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Welcome to Laggron's Dumb Cogs's documentation!

say
roleinvite
instantcommands


Indices and tables
Expand Down
176 changes: 176 additions & 0 deletions docs/.build/html/_sources/instantcommands.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
===============
InstantCommands
===============

.. note:: These docs refers to the **beta 2b** version.
Make sure you're under the good version by typing ``[p]cog update``.

This is the guide for the ``instantcmd`` cog. Everything you need is here.

``[p]`` is considered as your prefix.

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

To install the cog, first load the downloader cog, included
in core Red.::

[p]load downloader

Then you will need to install the Laggron's Dumb Cogs repository::

[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3

Finally, you can install the cog::

[p]cog install Laggrons-Dumb-Cogs instantcmd

.. warning:: The cog is not loaded by default.
To load it, type this::

[p]load instantcmd

-----
Usage
-----

InstantCommands is designed to create new commands and listeners directly
from Discord. You just need basic Python and discord.py knowledge.

Here's an example of his it works:

.. image:: .ressources/EXAMPLES/InstantCommands-example.png

Here's a list of all commands of this cog:

~~~~~~~~~~~~~~
instantcommand
~~~~~~~~~~~~~~

**Syntax**::

[p][instacmd|instantcmd|instantcommand]

**Description**

This is the main command used for setting up the code.
It will be used for all other commands.

~~~~~~~~~~~~~~~~~~~~~
instantcommand create
~~~~~~~~~~~~~~~~~~~~~

**Syntax**::

[p]instantcommand create

**Description**

Creates a new command/listener from a code snippet.

You will be asked to give a code snippet which will contain your function.
It can be a command (you will need to add the ``commands`` decorator) or a listener
(your function name must correspond to an existing discord.py listener).

.. tip:: Here are some examples

.. code-block:: python
@roleset.command()
@commands.command()
async def command(ctx, *, argument):
"""Say your text with some magic"""
await ctx.send("You excepted to see your text, "
"but it was I, Dio!")
.. code-block:: python
async def on_reaction_add(reaction, user):
await reaction.message.add_reaction('')
await message.channel.send("Here's some love for " + user.mention)
.. note::

Here are the available values for your code snippet:

* ``discord``

* ``ext.commands``

* ``asyncio``

* ``inspect``

* ``traceback``

* ``random``

* ``redbot.core``

* ``checks``

* ``Config``

* ``utils.chat_formatting.pagify``

It isn't recommanded to use the ``Config`` value for now.
A future release should give a ready ``Config.Config`` object.


~~~~~~~~~~~~~~~~~~~~
instantcommad delete
~~~~~~~~~~~~~~~~~~~~

**Syntax**

.. code_block:: none

[p]instantcommand [delete|del|remove] <name>

**Description**

Remove an instant command or a listener from what you registered before.

.. warning::

Listeners won't be removed from discord.py uneless you restart, since
their function to remove listeners doesn't seem to work. Restart the bot to make
sure the listener is well removed.

**Arguments**

* ``<name>`` The name of the command/listener.

~~~~~~~~~~~~~~~~~~~
instantcommand info
~~~~~~~~~~~~~~~~~~~

**Syntax**

.. code-block:: none
[p]instantcommand info [command]
**Description**

List all existings commands and listeners created with InstantCommands.

You can give a command/listener name to show its source code.

.. note::

This only works with InstantCommands' commands and listeners.

**Arguments**

* ``[commands]`` The command/listener name to get the source code from.
If not given, a list of existing commands and listeners created with the cog
is shown.

.. method:: hello(penis)

.. name::

penus
10 changes: 10 additions & 0 deletions docs/.build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="say.html">Say</a></li>
<li class="toctree-l1"><a class="reference internal" href="roleinvite.html">RoleInvite</a></li>
<li class="toctree-l1"><a class="reference internal" href="instantcommands.html">InstantCommands</a></li>
</ul>


Expand Down Expand Up @@ -148,8 +149,17 @@
<h1 id="index">Index</h1>

<div class="genindex-jumpbox">
<a href="#H"><strong>H</strong></a>

</div>
<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="instantcommands.html#hello">hello()</a>
</li>
</ul></td>
</tr></table>



</div>
Expand Down
2 changes: 2 additions & 0 deletions docs/.build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="say.html">Say</a></li>
<li class="toctree-l1"><a class="reference internal" href="roleinvite.html">RoleInvite</a></li>
<li class="toctree-l1"><a class="reference internal" href="instantcommands.html">InstantCommands</a></li>
</ul>


Expand Down Expand Up @@ -160,6 +161,7 @@ <h1>Welcome to Laggron’s Dumb Cogs’s documentation!<a class="headerlink" hre
<ul>
<li class="toctree-l1"><a class="reference internal" href="say.html">Say</a></li>
<li class="toctree-l1"><a class="reference internal" href="roleinvite.html">RoleInvite</a></li>
<li class="toctree-l1"><a class="reference internal" href="instantcommands.html">InstantCommands</a></li>
</ul>
</div>
</div>
Expand Down

0 comments on commit 7a28049

Please sign in to comment.