aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/valentines/myvalenstate.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/valentines/myvalenstate.py')
-rw-r--r--bot/seasons/valentines/myvalenstate.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/bot/seasons/valentines/myvalenstate.py b/bot/seasons/valentines/myvalenstate.py
index 9f06553d..46fdebbc 100644
--- a/bot/seasons/valentines/myvalenstate.py
+++ b/bot/seasons/valentines/myvalenstate.py
@@ -16,13 +16,14 @@ with open(Path('bot', 'resources', 'valentines', 'valenstates.json'), 'r') as fi
class MyValenstate:
+ """A Cog to find your most likely Valentine's vacation destination."""
+
def __init__(self, bot):
self.bot = bot
def levenshtein(self, source, goal):
- """
- Calculates the Levenshtein Distance between source and goal.
- """
+ """Calculates the Levenshtein Distance between source and goal."""
+
if len(source) < len(goal):
return self.levenshtein(goal, source)
if len(source) == 0:
@@ -43,6 +44,8 @@ class MyValenstate:
@commands.command()
async def myvalenstate(self, ctx, *, name=None):
+ """Find the vacation spot(s) with the most matching characters to the invoking user."""
+
eq_chars = collections.defaultdict(int)
if name is None:
author = ctx.message.author.name.lower().replace(' ', '')
@@ -81,5 +84,7 @@ class MyValenstate:
def setup(bot):
+ """Valenstate Cog load."""
+
bot.add_cog(MyValenstate(bot))
log.debug("MyValenstate cog loaded")