translator-discord
v1.0.1
Published
```js const discord = require("discord.js"), client = new discord.Client(), {token, prefix, base_lang} = require("./config.json")
Downloads
1
Readme
const discord = require("discord.js"),
client = new discord.Client(),
{token, prefix, base_lang} = require("./config.json")
let Translator = require("translator-discord");
Translator = new Translator()
client.on("ready", () => console.log("Translator Bot is connected to Discord."));
client.on("message", async (message) => {
const translation = await Translator.autoTranslate(message, { from: "en"", to: "my"});
if(translation) return message.channel.send(translation)
})
client.login(token)