From 1c59ceb3cbf7ae46147c2b864c7a2aebac1ccc7d Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Wed, 4 May 2022 09:32:00 -0700 Subject: [PATCH] updating corona arguments and adding some newlines to help fucntions. also adding an alias for corona as covid --- app/cogs/actual_utils.py | 6 +++--- app/corona.py | 10 +++++----- app/help_methods.py | 32 ++++++++++++++++---------------- helm/values.yaml | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index 0ce83603..8d08faaf 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -78,13 +78,13 @@ class ActualUtils(commands.Cog): await ctx.send(embed=embed) - @commands.command(name="corona") - async def corona(self, ctx: commands.Context): + @commands.command(name="corona", aliases=["covid"]) + async def corona(self, ctx: commands.Context, *, location=None): import corona async with ctx.message.channel.typing(): - result = corona.parse_message(ctx.message.content) + result = corona.parse_message(location) await ctx.send(embed=result) diff --git a/app/corona.py b/app/corona.py index 878c7bbc..a222cb76 100755 --- a/app/corona.py +++ b/app/corona.py @@ -139,9 +139,9 @@ def sum_numbers(location): def parse_message(message): try: - state = string.capwords(" ".join(message.lstrip("!corona").split())) - if not state: - state = "California" + location = string.capwords(" ".join(message.split())) + if not location: + location = "California" except IndexError: - state = "California" - return sum_numbers(state) + location = "California" + return sum_numbers(location) diff --git a/app/help_methods.py b/app/help_methods.py index fe2a0b4f..23ef76aa 100755 --- a/app/help_methods.py +++ b/app/help_methods.py @@ -34,27 +34,27 @@ def get_help_message(method): "koala": ["Returns a random koala photo", "\nUsage: !koala"], "clap": [ "Returns the shittiest meme created by sassy girls on twitter this century", - "Usage: !clap some text to be meme'mt", + "\nUsage: !clap some text to be meme'mt", ], "simp": [ "Returns a license to be a simp", - "Usage: !simp https://some.photo.jpg", + "\nUsage: !simp https://some.photo.jpg", ], "horny": [ "Returns a license to be horny", - "Usage: !horny https://some.photo.jpg", + "\nUsage: !horny https://some.photo.jpg", ], "wasted": [ "Overlays the GTAV wasted text over the image you link", - "Usage: !wasted https://some.photo.jpg", + "\nUsage: !wasted https://some.photo.jpg", ], "cleanup": [ "Admin use only. Deletes dale bot's messages from the channel", - "Usage: !cleanup", + "\nUsage: !cleanup", ], "corona": [ "Pulls the latest corona virus stats per state from Johns Hopkins data", - "Usage: !corona \neg: !corona Colorado", + "\n!corona Colorado", ], "decide": [ "dale-bot will help make the tough decisions for you", @@ -63,7 +63,7 @@ def get_help_message(method): ], "ffxiv": [ "Pulls a characters data from the lodestone API\n", - "Usage: !ffxiv \n", + "\nUsage: !ffxiv \n", "eg: !ffxiv Slamsong Bardley Adamantoise\n\n", "Did you know that the critically acclaimed MMORPG Final Fantasy XIV has a free trial,\n", "and includes the entirety of A Realm Reborn AND the award-winning Heavensward expansion\n", @@ -98,19 +98,19 @@ def get_help_message(method): "Generates a one time use invite to the voice channel you are currently in.\n", "if you are not in a voice channel, the invite will be for whatever channel !invite was typed in.\n" "You can also specify if you want it to be a temporary invite by adding `temp` to the end\n", - "Usage: !invite or !invite temp", + "\nUsage: !invite or !invite temp", ], "issue": [ "Creates an issue on gitlab with the passed in parameters\n", - "Usage: !issue ; ", + "\nUsage: !issue ; ", ], "icon": [ "Returns the server's icon URL\n", - "Usage: !icon", + "\nUsage: !icon", ], "info": [ "Returns a blurb with information about the discord server\n", - "Usage: !info", + "\nUsage: !info", ], "lewd": [ "Returns a URL for a lewd image.", @@ -144,18 +144,18 @@ def get_help_message(method): ], "owo": [ "Returns some fucky wucky text\n", - "Usage: !owo what the fuck did you just fucking say about me you little shit?", + "\nUsage: !owo what the fuck did you just fucking say about me you little shit?", ], "pout": [ "Returns the URL for an anime girl pouting you filthy weeb\n", - "Usage: !pout", + "\nUsage: !pout", ], "rat": ["Returns a random rat photo", "\nUsage: !rat"], "roll": [ "Rolls N number of Y sided die\n", - "Usage: !roll 3d20\n", + "\nUsage: !roll 3d20\n", "You can also add a modifier on the end with a +", - "Usage: !roll 2d20+5", + "\nUsage: !roll 2d20+5", ], "sheeb": ["Returns a picture of a sheeb"], "smug": ["Returns the URL for smug anime girl"], @@ -166,7 +166,7 @@ def get_help_message(method): ], "trackdays": [ "Returns the track schedule for the tracks we frequent (buttonwillow and thunderhill).\n", - "Usage: !trackdays", + "\nUsage: !trackdays", ], "tts": [ "Uploads a file with the specified text as an MP3.\nThis is advanced shitposting", diff --git a/helm/values.yaml b/helm/values.yaml index de44e3a4..56656c9d 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: # Overrides the image tag whose default is the chart appVersion. - tag: "172" + tag: "173" repository: ldooks/dragon-bot pullPolicy: IfNotPresent