silikoniphone.blogg.se

Discord time translate bot
Discord time translate bot








discord time translate bot

I cannot add comments since I do not have enough reputation, so I will edit this post once I get more information about your code.Ĭould you please upload the full traceback? Also what happens if before calling the method group on the object, you ensures that it is not None ? (I don't know if this is in your code or in the library) The above exception was the direct cause of the following exception:įile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\discord\ext\commands\bot.py", line 902, in invokeįile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\discord\ext\commands\core.py", line 864, in invokeįile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\discord\ext\commands\core.py", line 94, in wrappedĭ.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group' Where am I going wrong? Any help would be much appreciated!Įdit: the full traceback: Ignoring exception in command translate:įile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrappedįile "C:\Users\wave computer\PycharmProjects\pythonProject\cogs\translate.py", line 13, in translateįile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\googletrans\client.py", line 255, in detectĭata = self._translate(text, 'en', 'auto', kwargs)įile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\googletrans\client.py", line 78, in _translateįile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\googletrans\gtoken.py", line 194, in doįile "C:\Users\wave computer\PycharmProjects\pythonProject\venv\lib\site-packages\googletrans\gtoken.py", line 62, in _updateĬode = self.RE_TKK.search(r.text).group(1).replace('var ', '')ĪttributeError: 'NoneType' object has no attribute 'group'

discord time translate bot

Translation = anslate(message)Įmbed = discord.Embed(color=_theme())Įmbed.add_field(name=f"Language: ')īut it shows this error: .CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'group'. My following cog code is: "Tl", "Translate"])Īsync def translate(self, ctx, *, message): So after my import statements, I have translator = Translator(). It seems fairly simple and it should have worked without any hassle, or so I thought. I've been trying to make my discord bot translate texts using a module called googletrans.










Discord time translate bot