help consistancy

This commit is contained in:
klemek
2021-01-13 16:44:01 +01:00
parent aa51e2cda0
commit 8ef2c0588d
10 changed files with 38 additions and 34 deletions
+17 -13
View File
@@ -10,21 +10,25 @@ When you need statistics about your discord server
* `%help (command)` - info about commands * `%help (command)` - info about commands
* `%info` - version and uptime * `%info` - version and uptime
* `%scan`: full analysis * `%scan` - full analysis
* `%freq`: frequency analysis * `%freq` - frequency analysis
* `%compo`: composition analysis * `%compo` - composition analysis
* `%pres`: presence analysis * `%pres` - presence analysis
* `%emojis` : rank emotes by their usage * `%emojis` - rank emotes by their usage
* arguments: * arguments:
* <n> : top <n> emojis, default is 20 * `<n>` - top <n> emojis, default is 20
* all : list all common emojis in addition to this guild's * `all` - list all common emojis in addition to this guild's
* members : show top member for each emote * `members` - show top member for each emote
* sort:usage/reaction : other sorting methods * `sort:usage/reaction` - other sorting methods
* `%mentions`: rank mentions by their usage * `%mentions` - rank mentions by their usage
* arguments: * arguments:
* <n> : top <n> mentions, default is 10 * `<n>` - top <n> mentions, default is 10
* all : show role/channel/everyone/here mentions * `all` - show role/channel/everyone/here mentions
* `%cancel` : cancel current analysis * `%mentioned` - rank specific user mentions by their usage
* arguments:
* `<n>` - top <n> mentions, default is 10
* `all` - show role/channel/everyone/here mentions
* `%cancel` - cancel current analysis
* Common arguments: * Common arguments:
* @member/me : filter for one or more member * @member/me : filter for one or more member
+2 -2
View File
@@ -31,10 +31,10 @@ bot.register_command(
"(cancel|stop)", "(cancel|stop)",
GuildLogs.cancel, GuildLogs.cancel,
"cancel: stop current analysis", "cancel: stop current analysis",
"```\n" + "%cancel : Stop current analysis\n" + "```", "```\n" + "%cancel: Stop current analysis\n" + "```",
) )
bot.register_command( bot.register_command(
"(mentioned)", "mentioned",
lambda *args: MentionedScanner().compute(*args), lambda *args: MentionedScanner().compute(*args),
"mentioned: rank specific user mentions by their usage", "mentioned: rank specific user mentions by their usage",
MentionedScanner.help(), MentionedScanner.help(),
+1 -1
View File
@@ -16,7 +16,7 @@ class CompositionScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%compo : Show composition statistics\n" + "%compo: Show composition statistics\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "Example: %compo #mychannel1 @user\n" + "Example: %compo #mychannel1 @user\n"
+5 -5
View File
@@ -16,13 +16,13 @@ class EmotesScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%emojis : Rank emojis by their usage\n" + "%emojis: Rank emojis by their usage\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "* <n> : top <n> emojis, default is 20\n" + "* <n> - top <n> emojis, default is 20\n"
+ "* all : list all common emojis in addition to this guild's\n" + "* all - list all common emojis in addition to this guild's\n"
+ "* members : show top member for each emojis\n" + "* members - show top member for each emojis\n"
+ "* sort:usage/reaction : other sorting methods\n" + "* sort:usage/reaction - other sorting methods\n"
+ "Example: %emojis 10 all #mychannel1 #mychannel2 @user\n" + "Example: %emojis 10 all #mychannel1 #mychannel2 @user\n"
+ "```" + "```"
) )
+1 -1
View File
@@ -16,7 +16,7 @@ class FrequencyScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%freq : Show frequency-related statistics\n" + "%freq: Show frequency-related statistics\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "Example: %freq #mychannel1 @user\n" + "Example: %freq #mychannel1 @user\n"
+1 -1
View File
@@ -16,7 +16,7 @@ class FullScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%scan : Show full statistics\n" + "%scan: Show full statistics\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "Example: %scan #mychannel1 @user\n" + "Example: %scan #mychannel1 @user\n"
+4 -4
View File
@@ -24,12 +24,12 @@ class MentionedScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%mentioned : Rank specific user's mentions by their usage\n" + "%mentioned: Rank specific user's mentions by their usage\n"
+ "arguments:\n" + "arguments:\n"
+ "* @member/me : (required) one or more member\n" + "* @member/me - (required) one or more member\n"
+ "\n".join(COMMON_HELP_ARGS.split("\n")[1:]) + "\n".join(COMMON_HELP_ARGS.split("\n")[1:])
+ "* <n>: top <n> mentions, default is 10\n" + "* <n> - top <n> mentions, default is 10\n"
+ "* all: include bots mentions\n" + "* all - include bots mentions\n"
+ "Example: %mentioned 10 @user\n" + "Example: %mentioned 10 @user\n"
+ "```" + "```"
) )
+3 -3
View File
@@ -24,11 +24,11 @@ class MentionsScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%mentions : Rank mentions by their usage\n" + "%mentions: Rank mentions by their usage\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "* <n> : top <n> mentions, default is 10\n" + "* <n> - top <n> mentions, default is 10\n"
+ "* all : show role/channel/everyone/here mentions\n" + "* all - show role/channel/everyone/here mentions\n"
+ "Example: %mentions 10 #mychannel1 #mychannel2 @user\n" + "Example: %mentions 10 #mychannel1 #mychannel2 @user\n"
+ "```" + "```"
) )
+1 -1
View File
@@ -15,7 +15,7 @@ class PresenceScanner(Scanner):
def help() -> str: def help() -> str:
return ( return (
"```\n" "```\n"
+ "%pres : Show presence statistics\n" + "%pres: Show presence statistics\n"
+ "arguments:\n" + "arguments:\n"
+ COMMON_HELP_ARGS + COMMON_HELP_ARGS
+ "Example: %pres #mychannel1 @user\n" + "Example: %pres #mychannel1 @user\n"
+3 -3
View File
@@ -9,9 +9,9 @@ from datetime import datetime
COMMON_HELP_ARGS = ( COMMON_HELP_ARGS = (
"" ""
+ "* @member/me : filter for one or more member\n" + "* @member/me - filter for one or more member\n"
+ "* #channel/here : filter for one or more channel\n" + "* #channel/here - filter for one or more channel\n"
+ "* fast: only read cache\n" + "* fast - only read cache\n"
) )