stt-datacore / bot

6 stars 6 forks source link

Bug: Bot breaks if crewneed field output is too big #15

Open ineffyble opened 3 years ago

ineffyble commented 3 years ago
error: Error during command execution {"error":"RichEmbed field values may not exceed 1024 characters.","callstack":"RangeError: RichEmbed field values may not exceed 1024 characters.\n    at Function.normalizeField (/Users/effy/Code/bot/node_modules/discord.js/src/structures/RichEmbed.js:325:36)\n    at RichEmbed.addField (/Users/effy/Code/bot/node_modules/discord.js/src/structures/RichEmbed.js:162:39)\n    at asyncHandler (/Users/effy/Code/bot/build/commands/crewneed.js:115:31)\n    at async /Users/effy/Code/bot/build/utils.js:88:13"}

caused by -d crewneed mike burnham sr. for Daxed.

The data that's being pushed into the embed which is too large is this:

[3* Polyalloy](http://localhost:4420/item_info?symbol=polyalloy_quality3_compon) (need 8, have 0), [1* Casing](http://localhost:4420/item_info?symbol=casing_quality1_compon) (need 6, have 0), [3* Sensor](http://localhost:4420/item_info?symbol=sensor_quality3_compon) (need 4, have 0), [4* Sensor](http://localhost:4420/item_info?symbol=sensor_quality4_compon) (need 4, have 0), [4* Casing](http://localhost:4420/item_info?symbol=casing_quality4_compon) (need 4, have 0), [3* Optronic Circuit](http://localhost:4420/item_info?symbol=optronic_circuit_quality3_compon) (need 4, have 1), [1* Power Cell](http://localhost:4420/item_info?symbol=power_cell_quality1_compon) (need 3, have 2), [0* Desktop Monitor](http://localhost:4420/item_info?symbol=desktop_monitor_24c2_quality0_equip) (need 2, have 2), [2* Science Experiment - Faction](http://localhost:4420/item_info?symbol=science_experiment_quality2_equip) (need 1, have 0), [2* Authorization Code](http://localhost:4420/item_info?symbol=authorization_code_quality2_equip) (need 1, have 1)