Discord.py: googletrans command suddenly stopped working

600 Views Asked by At

I'm making a discord.py bot and I'm trying to make some commands with the googletrans module for translation.

My code was running just fine last night but when I tried it this morning, the language detection command wasn't working anymore, and I haven't even changed anything. Here's the code

import discord
from discord.ext import commands
import googletrans
from googletrans import Translator


client = commands.Bot(command_prefix=".")


@client.command()
async def languages(ctx, *, input):
    translator = Translator()
    await ctx.send(translator.detect(f'{input}'))

client.run(Token)

All the other bot commands are working fine, including the ones using the googletrans module, and there are no error messages. Any explanation why it worked the first day, but not the after that?

0

There are 0 best solutions below