Skip to content

Commit

Permalink
[cashdrop] Fix wrong answers getting marked as correct (#222)
Browse files Browse the repository at this point in the history
* dont use contains for checking

* bump version
  • Loading branch information
sravan1946 authored Mar 20, 2024
1 parent 26d37f4 commit e8061cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can contact me in the Red 3rd party server in #support_flare-cogs
| AntiSpam | 0.1.0 | <details><summary>Block users who spam commands for a defined period of time.</summary></details> | flare(flare#0001) |
| ApiTools | 0.0.3 | <details><summary>Simple GET/POST requests via the bot.</summary></details> | flare(flare#0001) |
| BotListsPost | 0.0.6 | <details><summary>Post server count to various discord bot lists.</summary></details> | flare(flare#0001) |
| CashDrop | 0.2.1 | <details><summary>Random credits drop, where people can answer questions or pick them up!</summary></details> | flare(flare#0001) |
| CashDrop | 0.2.2 | <details><summary>Random credits drop, where people can answer questions or pick them up!</summary></details> | flare(flare#0001) |
| CommandStats | 0.1.5 | <details><summary>Track all commands used.</summary>Track all commands used globally, guild wise and during the current session.</details> | flare(flare#0001) |
| Covid | 0.3.1 | <details><summary>Show Covid-19 (Novel Coronavirus) Statistics.</summary>List stats of Covid-19 (Novel Coronavirus), global or countrywise!</details> | flare(flare#0001) |
| Crypto | 0.1.0 | <details><summary>Buy and sell cyrptocurrencies with Red economy.</summary>Buy and sell cryptocurrencies with Red economy.</details> | flare(flare#0001), Flame, and TrustyJAID |
Expand Down
6 changes: 3 additions & 3 deletions cashdrop/cashdrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class Cashdrop(commands.Cog):
__version__ = "0.2.1"
__version__ = "0.2.2"
__author__ = "flare(flare#0001)"

def format_help_for_context(self, ctx):
Expand Down Expand Up @@ -91,7 +91,7 @@ async def on_message(self, message):
string, answer = self.random_calc()
msg = await channel.send(string)
try:
pred = MessagePredicate.lower_contained_in(str(answer), channel=channel, user=None)
pred = MessagePredicate.equal_to(str(answer), channel=channel, user=None)
answer_msg: discord.Message = await self.bot.wait_for(
"message", check=pred, timeout=10
)
Expand All @@ -111,7 +111,7 @@ async def on_message(self, message):
msg = await channel.send(
f"Some {await bank.get_currency_name(guild=message.guild)} have fallen, type `pickup` to pick them up!"
)
pred = MessagePredicate.lower_contained_in("pickup", channel=channel, user=None)
pred = MessagePredicate.equal_to("pickup", channel=channel, user=None)
try:
pickup_msg: discord.Message = await self.bot.wait_for(
"message", check=pred, timeout=10
Expand Down

0 comments on commit e8061cf

Please sign in to comment.