From abd245f730afc48e5e20f4f7bd88d17cd659c145 Mon Sep 17 00:00:00 2001 From: Kamal Curi Date: Thu, 18 Aug 2022 12:50:34 -0300 Subject: [PATCH 1/3] CHANGE: Fixed the grammar and made friendly hints --- utils/commands.py | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/utils/commands.py b/utils/commands.py index 33be317..63b31e7 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -19,19 +19,19 @@ async def quote(bot: object, *quote: str) -> str: Save a quote into database. """ if not quote: - return await bot.send('Insert a message to save.\n_Your dumb ass!_') + return await bot.send('You\'re not my mute uncle, tell me something to remember.\n(You have\'nt provided a quote') quote = ' '.join(quote) if 'http' in quote and 'discord' in quote and not quote[-4:] == '.png': - return await bot.send("- _Don't fuck, dumb ass!_\n"\ - "- _Hey put a valid image link, bitch!_\n- _Are you an idiot? You mother fucker!_") + return await bot.send("- _Check your link, dumbass! You're trying to quote an image from a message, but you're quoting the message itself!_\n"\ + "(Make sure to copy the link for the image by clicking on it, right-clicking the image and then clicking on \"Save Link\"") try: user = bot.author.name set_quote(user, quote) except Exception as ex: - return await bot.send(f'{ex.args}\n_What that fuck you doing?_') + return await bot.send(f'{ex.args}\n_What the fuck are you doing?_') else: return await bot.send('Done:\n`%s`' % quote) @@ -49,7 +49,7 @@ async def random_quote(bot: object) -> str: quote_id_stack.pop(0) quotes = get_quotes(quote_id_stack) elif not quotes: - return await bot.send('Have no one quote saved.\n_Hey jerk, coffee?_') + return await bot.send('You\'ve got no quotes saved yet.\n(Save quotes by using `--q str: """ Get quote by ID. """ - if not isinstance(_id, int) or not _id: - return await bot.send("_Don't fuck, you ass hole_.\nThe ID need to be a interger!") + syntax = "`--qid `" + + if not _id: + return await bot.send("_If you don't tell me the ID, how the fuck do you expect me to quote it to you!?_\n(The correct syntax is " + syntax ) + + if not isinstance(_id, int): + return await bot.send("_Don't fuck with me, you asshole. The ID needs to be an interger!_\n(The correct syntax is " + syntax) quote = get_by_id(_id) if not quote: - return await bot.send("_Got wrong, you socker!_\nThis ID doesn't exist in database!") + return await bot.send("_Wrong ID, sucker!_\n(There's no such quote with id " + _id) try: # To image links. @@ -95,23 +100,27 @@ async def delete_quote(bot, _id: int=None) -> str: """ Delete one quote by database ID. """ + syntax = "`--dq `" roles = [r.name for r in bot.author.roles] if not 'Operador' in roles: - return await bot.send("_Don't fuck, you ass hole_.\n"\ - "_You have no permission for this command!_") + return await bot.send("_And who the fuck do **YOU** think you are!?_.\n"\ + "(You don't have the necessary role for this command") + + if not _id: + return await bot.send("_If you don't tell me the ID, how the fuck do you expect me to delete it to you!?_\n(The correct syntax is " + syntax ) - if not isinstance(_id, int) or not _id: - return await bot.send("_Don't fuck, you ass hole_.\nThe ID need to be a interger!") + if not isinstance(_id, int): + return await bot.send("_Don't fuck with me, you asshole. The ID needs to be an interger!_\n(The correct syntax is " + syntax) quote = get_by_id(_id) if not quote: - return await bot.send("_Got wrong, you socker!_\nThis ID doesn't exist in database!") + return await bot.send("_Wrong ID, sucker!_\n(There's no such quote with id " + _id) try: if not remove_quote(_id): - return await bot.send('_Something wrong happen, dude!_') + return await bot.send('_Something wrong happened, dude!_') return await bot.send('_Evidence deleted, fella!_') except Exception as ex: From afac028977fa66813aaea39955e7228a253df83c Mon Sep 17 00:00:00 2001 From: Kamal Curi Date: Thu, 18 Aug 2022 12:51:40 -0300 Subject: [PATCH 2/3] CHANGE: Lowered the repetition stack treshold --- utils/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/commands.py b/utils/commands.py index 63b31e7..0283398 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -42,7 +42,7 @@ async def random_quote(bot: object) -> str: Get an random quote from database. """ quotes = get_quotes(quote_id_stack) - stack_limit = int((len(quotes) * .5)) + stack_limit = int((len(quotes) * .25)) stack_len = len(quote_id_stack) if not quotes and stack_len > 0: From dbbd89415930ee5800113a278559aa58aa83478d Mon Sep 17 00:00:00 2001 From: Kamal Curi Date: Thu, 18 Aug 2022 12:52:19 -0300 Subject: [PATCH 3/3] CHANGE: It's 'quote_id', not 'buote_id' --- utils/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/commands.py b/utils/commands.py index 0283398..107fbdf 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -67,7 +67,7 @@ async def random_quote(bot: object) -> str: return await bot.send(ex) -@client.command(aliases=['bid']) +@client.command(aliases=['qid']) async def by_id(bot, _id: int=None) -> str: """ Get quote by ID.