-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30f80e3
commit d5e53da
Showing
10 changed files
with
106 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Discord.WebSocket; | ||
using System.Linq; | ||
|
||
namespace PokecordCatcherBot | ||
{ | ||
public static class MessagePredicates | ||
{ | ||
public static bool TradeMessage(SocketMessage x, SocketMessage context) => | ||
x.Channel.Id == context.Channel.Id && x.Author.Id == PokecordCatcher.POKECORD_ID && x.Embeds.Count > 0 && x.Embeds.First().Title?.StartsWith("Trade between ") == true; | ||
|
||
public static bool PokemonListingMessage(SocketMessage x, SocketMessage context) => | ||
x.Channel.Id == context.Channel.Id && x.Author.Id == PokecordCatcher.POKECORD_ID && x.Embeds.Count > 0 && x.Embeds.First().Title?.StartsWith("Your") == true; | ||
|
||
public static bool SuccessfulCatchMessage(SocketMessage x, SocketMessage context, ulong userId) => | ||
x.Channel.Id == context.Channel.Id && x.Author.Id == PokecordCatcher.POKECORD_ID && x.MentionedUsers.Any(y => y.Id == userId) && x.Content.StartsWith("Congratulations"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.