Positional arguments changed (#105)
This commit is contained in:
parent
0749706e88
commit
acaa5b8fb9
@ -12,7 +12,8 @@ class TTS(Cog):
|
|||||||
Send Text-to-Speech messages
|
Send Text-to-Speech messages
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True)
|
self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True)
|
||||||
@ -28,7 +29,7 @@ class TTS(Cog):
|
|||||||
Send Text to speech messages as an mp3
|
Send Text to speech messages as an mp3
|
||||||
"""
|
"""
|
||||||
mp3_fp = io.BytesIO()
|
mp3_fp = io.BytesIO()
|
||||||
tts = gTTS(text, "en")
|
tts = gTTS(text, lang="en")
|
||||||
tts.write_to_fp(mp3_fp)
|
tts.write_to_fp(mp3_fp)
|
||||||
mp3_fp.seek(0)
|
mp3_fp.seek(0)
|
||||||
await ctx.send(file=discord.File(mp3_fp, "text.mp3"))
|
await ctx.send(file=discord.File(mp3_fp, "text.mp3"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user