âī¸Message Templates
Message templates allow you to customize the way messages look and what information they contain.
Following message templates are supported:
đ¨Discord EmbedđĻTweetPlaceholders
Placeholders are used in message templates to embed various information from an event into your message.
Static placeholders
Static placeholders always resolve to the same value for the same event
Name | Sample value | Events |
---|---|---|
buyer_address | 0x249c134b254b119b42af0dccd31001258ea43274 | Sale |
buyer_address_short | 0x24...3274 | Sale |
buyer_url | https://polygonscan.com/address/0x249c134b254b119b42af0dccd31001258ea43274 | Sale |
collection_address | 0x09421f533497331e1075fdca2a16e9ce3f52312b | Listing, Sale |
collection_name | HellCats | Listing, Sale |
marketplace_chain | Polygon | Listing, Sale |
marketplace_name | OnePlanet | Listing, Sale |
nft_id | 12345678901234567890 | Listing, Sale |
nft_id_short | 1234...7890 | Listing, Sale |
nft_name | HellCat #540 | Listing, Sale |
nft_rank | 344 | Listing, Sale |
nft_rank_top | 13.8 | Listing, Sale |
nft_traits | âĸ Background: Purple (7.08%) âĸ Fur: Ginger (5.52%) âĸ Clothes: Varsity Jacket (3.6%) âĸ Mouth: Teeth Grind (5.52%) âĸ Eyes: Angry (7.28%) âĸ Hat: Pierced Ear (5.44%) | Listing, Sale |
nft_traits_no_rarity | âĸ Background: Purple âĸ Fur: Ginger âĸ Clothes: Varsity Jacket âĸ Mouth: Teeth Grind âĸ Eyes: Angry âĸ Hat: Pierced Ear | Listing, Sale |
nft_url | https://www.oneplanetnft.io/nfts/0x09421f533497331e1075fdca2a16e9ce3f52312b/540 | Listing, Sale |
price | 4.69k | Listing, Sale |
price_token | MATIC | Listing, Sale |
price_usd | 5.82k | Listing, Sale |
seller_address | 0x249c134b254b119b42af0dccd31001258ea43274 | Listing, Sale |
seller_address_short | 0x24...3274 | Listing, Sale |
seller_url | https://polygonscan.com/address/0x249c134b254b119b42af0dccd31001258ea43274 | Listing, Sale |
timestamp_ms | 1676401200000 | Listing, Sale |
timestamp_s | 1676401200 | Listing, Sale |
token_standard | ERC-721 | Listing, Sale |
tx_hash | 0x89c46e921a5d687e85c4953bdeeb5d224603f81924d0dff7c7e49d3d3beb898c | Listing, Sale |
tx_url | https://polygonscan.com/tx/0x89c46e921a5d687e85c4953bdeeb5d224603f81924d0dff7c7e49d3d3beb898c | Listing, Sale |
quantity | 1 | Listing, Sale |
Place "\" character before the opening brace to escape the placeholder. E.g. "\{tx_hash}" will resolve to "\{tx_hash}" in the resulting message instead of "\0x89...b98c"
Dynamic placeholders
Dynamic placeholders resolve to different values based on a given key
Name | Usage | Sample value | Events |
---|---|---|---|
nft_trait | nft_trait[Color] | Purple | Listing, Sale |
nft_trait_rarity | nft_trait_rarity[Color] | 7.08 | Listing, Sale |
Placeholders from constants
You can use constants that you define in your custom bot configuration as placeholders in your message templates. Let's say you have such constant defined:
You can use it in your message template as "{price_icon}" placeholder. It will resolve to đđđ for sales above $1000, đđ for sales above $500, đ for sales above $100 and and empty text for the rest.
Last updated