full pythondoc

This commit is contained in:
klemek
2019-11-13 18:18:22 +01:00
parent c312c20af5
commit 067fef344b
4 changed files with 316 additions and 96 deletions
+27 -17
View File
@@ -2,22 +2,32 @@ from utils import debug
async def compute(message, args):
"""
Computes the %help command
:param message: message sent
:type message: discord.Message
:param args: arguments of the command
:type args: list[str]
"""
debug(message, f"command '{message.content}'")
# Select correct response to send
response = "Discord Analyst commands:\n" \
"```\n" \
"%help (command) : Info on commands\n" \
"%info : This bot info\n" \
"%emotes : Emotes analysis\n" \
"```"
if len(args) > 1 and args[1] == "emotes":
await message.channel.send(
"Emotes Analysis:\n"
"```"
"%emotes : Rank emotes by their usage\n"
"%emotes @user : // for a specific user\n"
"%emotes #channel : // for a specific channel\n"
"(Add more @user or #channel to be more selective)"
"```")
return
else:
await message.channel.send(
"Discord Analyst commands:\n"
"```"
"%help (command) : Info on commands\n"
"%info : This bot info\n"
"%emotes : Emotes analysis"
"```")
response = "Emotes Analysis:\n" \
"```\n" \
"%emotes : Rank emotes by their usage\n" \
"%emotes @user : // for a specific user\n" \
"%emotes #channel : // for a specific channel\n" \
"(Add more @user or #channel to be more selective)\n" \
"```"
await message.channel.send(response)