User manual - chicklightning/tcg-pocket-trading-bot GitHub Wiki

Here you can find a description of supported commands, how to use them, and expected responses.

Slash commands

/add-cards

Gif showing user adding cards to their desired cards list using this command.

This command lets you add cards to the list of cards you want other people to trade to you (so cards you need). Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with the bot, DMs with other users, or in a server channel.

Constraints

You can add up to 10 cards at a time, and must add a minimum of one (1) card each time you use this command.

Autocomplete

For each card "input" option, you can start typing the name of the card you want (like "sha" for "Shaymin") and a list of matching tradeable cards will appear. You should select one of these options rather than typing your own, or the command will not add the card.

Multiple copies of a card

If you want to add multiple copies of the same card, you must add them separately, i.e. first-card would be "Burmy from TL ♦️" and second-card would be "Burmy from TL ♦️" to add two copies of this card to your list.

Error states

If you attempt to add a card to your list that doesn't exist or was mistyped, the command will let you know in the response.

/remove-cards

Gif showing user removing cards from their desired cards list using this command.

This command lets you remove cards from the list of cards you want other people to trade to you (so cards you no longer need). Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with the bot, DMs with other users, or in a server channel.

Constraints

You can remove up to 10 cards at a time, and must remove a minimum of one (1) card each time you use this command.

Autocomplete

For each card "input" option, you can start typing the name of the card you want to remove (like "sha" for "Shaymin") and a list of matching cards from your desired cards list will appear. You should select one of these options rather than typing your own, or the command will not remove the card.

Multiple copies of a card

If you want to remove multiple copies of the same card, you must remove them separately, i.e. first-card would be "Burmy from TL ♦️" and second-card would be "Burmy from TL ♦️" to remove two copies of this card from your list.

Error states

If you attempt to remove a card from your list that was never in your list, the command will let you know in the response.

/get-cards

Gif showing user getting their list of desired cards list using this command.

This command returns a user's list of cards they wanted traded to them (the caller's own by default). Each card has a link to an image of the card. Response is visible to anyone in the channel where the command was called.

Scope

This command can be called in DMs with the bot, DMs with other users, or in a server channel. You cannot target other users if it's called in the bot's DMs.

Filtering

You can optionally filter the list based on rarity (1-5, 1 being ♦️, 2 being ♦️♦️, etc., and 5 being ⭐) or on card set (i.e. Triumphant Light). You can only pick one rarity and/or one set, so you can show all ⭐ cards you want from Genetic Apex, but not all ♦️ and ♦️♦️ cards. The default filtering is all rarities and all card sets if you do not choose an option for either.

If you select a target, you can opt to only show cards that they need that you don't also need by setting "filter-my-cards" to True. This is OFF by default.

Target

You can request to see another user's list of desired trade cards by typing their handle (using "@") in the "target" option.

Visibility

By default, the response of this command is only visible to you. If you want the response to be visible to all users in the channel, set the "visible-to-all" option to True.

Pagination

If there are more than 25 cards in the returned list, the response is paginated so you can scroll between pages in the list using the arrow buttons that appear at the bottom of the response. This will stop working after a period of time, so you can't go back to all old messages and scroll.

/start-trade

Gif showing user starting a trade with another user with this command.

This command lets you start a trade with another user. You must start a trade before offering a card. It will send a direct message to the other user letting them know you've started a trade with them. Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with other users or in a server channel.

Target

You must specify another user to start the trade with or you cannot complete the command. You cannot have multiple open trades with the same user.

Error states

If you have an open trade with your target user and attempt to open another trade, the bot will let you know in the response and the other user will not receive a new direct message.

/get-open-trades

Gif showing user getting their list of open trades with other users with this command.

This command lets you see your open (not completed) trades. Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with the bot, DMs with other users, or in a server channel. You cannot target other users if it's called in the bot's DMs.

Target

You can specify a target and see if you have an open trade with this user. If you don't specify a target, you will see all of your open trades.

Pagination

If there are more than 10 trades in the returned list, the response is paginated so you can scroll between pages in the list using the arrow buttons that appear at the bottom of the response. This will stop working after a period of time, so you can't go back to all old messages and scroll.

Error states

If you specify a target and do not have an open trade with them, the bot will let you know in the response.

/offer-card

Gif showing user offering another user a card in an open trade using this command.

This command lets you offer a card to a user you have started a trade with. You must start a trade (/start-trade) before offering a card. It will send a direct message to the other user letting them know you've updated your trade offer, and the card you've selected. Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with other users or in a server channel.

Target

You must specify another user to send the offered card to. You can only send a card to a user you've started a trade with.

Autocomplete

For the card you want to offer, you can start typing the name of the card you want (like "sha" for "Shaymin") and a list of matching tradeable cards will appear. The list shown by default is the list of cards the other user wants if they have any, otherwise it will show the list of all cards.

If the other user has already offered a card, the autocomplete options will be filtered to cards of a matching rarity from the other user's desired cards list if they have any, otherwise it will show all tradeable cards with a matching rarity.

Autocomplete will never suggest a card that you also need (a card in your list of desired cards).

Autocomplete filters

There are two autocomplete filter options turned on by default:

  • filter-to-target filters card options based on what cards the target user has in their desired cards list
  • filter-rarity filters card options based on the rarity of what the other user has offered (if they've offered a card)

The default is to only see cards in the other user's desired card list that match the rarity of the card they've offered to you. If they haven't offered you a card, you will see all of their desired cards.

Weird autocomplete behavior

NOTE: The filtering behavior here is weird depending on what order you enter the command options and what text is in the "card" option. Discord caches whatever autocomplete list you were shown FIRST when entering the command and you'll see this list whenever the "card" option has text you've entered before (like an empty "card" text box or just the letter "s"), even if you've updated the filter or changed the target user. If you start typing more of your query, your autocomplete options will match the options you expect to see from the filters you have turned on or off. This is unfortunately behavior I cannot change.

If your autocomplete options stop matching what you expect to see, restart typing the command. If you want to change the filter options, try setting them FIRST then selecting the target, then the card.

Error states

If you don't have a trade open with this user or you offer a card that doesn't exist (or mistyped the name), the bot will let you know in the response.

/complete-trade

Gif showing user completing a valid trade with another user with this command.

This command lets you complete a trade started with another user. You don't need to be the user who started the trade to complete it. It will send a direct message to the other user letting them know you've completed the trade. If the card you received was in your desired cards list, the count for that card will be decreased by 1. Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with other users or in a server channel.

Target

You must specify the other user you're completing the trade with. You can only complete a trade with a user you have an open trade with.

Error states

If you don't have a trade open with this user, or the trade is invalid (one or both of you have not offered a card, or the cards don't match in rarity) the bot will let you know in the response.

/cancel-trade

Gif showing user canceling an open trade with another user with this command.

This command lets you cancel a trade started with another user. You don't need to be the user who started the trade to cancel it. It will send a direct message to the other user letting them know you've canceled the trade. Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.

Scope

This command can be called in DMs with other users or in a server channel.

Target

You must specify the other user you're canceling the trade with. You can only cancel a trade with a user you have an open trade with.

Error states

If you don't have a trade open with this user, the bot will let you know in the response.

/help

Gif showing user calling help command without input and with input.

This command gives you information on how to use other commands. The information is mostly copied directly from this wiki page, with a link to each section on this page based on the command info requested. Passing in no command tells you how to use "/help".

Responses are ephemeral (only visible to the user who called the command) so they don't spam channels they're called in.