im not sure if this is just me but when i set this up locally and tested it empty arguments to ping seemed to break.
I'm seeing this exception:
/Users/fredsun/Code/Narwhal/commands/ping.js:8
if (args[0].toLowerCase() === "coingecko"){
^
TypeError: Cannot read property 'toLowerCase' of undefined
at Object.execute (/Users/fredsun/Code/Narwhal/commands/ping.js:8:21)
at DiscordCommandHandler._processCommand (/Users/fredsun/Code/Narwhal/services/discord_command_handler.js:47:20)
at Client.emit (events.js:311:20)
at MessageCreateAction.handle (/Users/fredsun/Code/Narwhal/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/Users/fredsun/Code/Narwhal/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/Users/fredsun/Code/Narwhal/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/Users/fredsun/Code/Narwhal/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/Users/fredsun/Code/Narwhal/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/Users/fredsun/Code/Narwhal/node_modules/ws/lib/event-target.js:132:16)
Repro steps:
message "$ping" in a discord channel.
I think the fix here is to just check for an empty arg list for now and return if it's empty.
im not sure if this is just me but when i set this up locally and tested it empty arguments to ping seemed to break.
I'm seeing this exception:
Repro steps:
$ping
" in a discord channel.I think the fix here is to just check for an empty arg list for now and return if it's empty.