Thought of adding a command which gives a summary of any keyword entered and went for the DuckDuckGO API.
Struggled with catching the proper part I needed from the API and displaying it to the user. As the it returned a lot of information about the keyword(such as links and a lot of specifications related to it), I had to filter the result only to get the short summary.
The bot was replying with [object Promise] until I realised that I’ve missed await when calling the function. The silly part was I’ve entered = instead of === in an if statement.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.