File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Messenger {
2020 embeds . forEach ( embed => {
2121 this . msg . channel . sendEmbed ( embed ) ;
2222 } ) ;
23- } ) ;
23+ } ) . catch ( err => console . log ( err ) ) ;
2424 }
2525
2626 negotiateMatch ( match ) {
Original file line number Diff line number Diff line change 1+ const Url = require ( 'urijs' ) ;
2+
3+ module . exports = ( client , embed ) => {
4+ console . log ( embed ) ;
5+ if ( embed . url ) {
6+ embed . url = Url ( embed . url ) . query ( { utm_source : 'discord' } ) . toString ( ) ;
7+ }
8+ return embed ;
9+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const Discord = require('discord.js');
33const Url = require ( 'urijs' ) ;
44
55const manamoji = require ( './middleware/manamoji' ) ;
6+ const utm = require ( './middleware/utm' ) ;
7+
68
79class TextResponse {
810 constructor ( client , cardName ) {
@@ -61,7 +63,7 @@ class TextResponse {
6163 }
6264}
6365
64- TextResponse . prototype . middleware = [ manamoji ] ;
66+ TextResponse . prototype . middleware = [ manamoji , utm ] ;
6567TextResponse . prototype . url = 'https://api.scryfall.com/cards/named' ;
6668
6769
You can’t perform that action at this time.
0 commit comments