plainheart / bing-translate-api

A simple and free API for Bing & Microsoft Translator for Node.js
https://github.com/plainheart/bing-translate-api
MIT License
156 stars 28 forks source link

added toString() before toLowerCase() #5

Closed ctnkaan closed 3 years ago

ctnkaan commented 3 years ago

I did this because Discord API gives an error if you try to do toLowerCase() before not doing toString(). This PR allows this project to be used with Discord bots. Tested it on my personal Discord Bot. It works without any issues.

Hope it helps. Thank you for this awesome project !

ctnkaan commented 3 years ago

image

Here is the results before the commit and after the commit

ctnkaan commented 3 years ago

image

Hello again. I hope I understand what you mean correctly. Do you mean something like this ? If so I can update this PR. I tested it and it seems to work without any issues. Hope I got it right.

ctnkaan commented 3 years ago

Ok I think I made the changes you mentioned and pushed them to this PR. Discord API still does not give an error. Sorry for the late response. It was like 6 AM at my local time so I went to bed. Hope I did it right. Thank your your great explanation at the comments. image

plainheart commented 3 years ago

Thanks a lot for your work!