Skip to content

Commit

Permalink
style: format code with Black
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in e072f2f according to the output
from Black.

Details: #26
  • Loading branch information
deepsource-autofix[bot] authored Jul 29, 2024
1 parent e072f2f commit a59d8b9
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 146 deletions.
20 changes: 10 additions & 10 deletions shizuka/ShizukaChatBot/VoiceChatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,36 @@ async def fetch(url):


async def ai_shizuka(url):
ai_name = 'Shizuka.mp3'
ai_name = "Shizuka.mp3"
async with aiohttp.ClientSession() as session, session.get(url) as resp:
if resp.status == 200:
f = await aiofiles.open(ai_name, mode='wb')
f = await aiofiles.open(ai_name, mode="wb")
await f.write(await resp.read())
await f.close()
return ai_name


@SHIZUKA.on_message(filters.command('shizuka'))
@SHIZUKA.on_message(filters.command("shizuka"))
async def shizuka(_, message):
if len(message.command) < 2:
await message.reply_text('Shizuka AI Voice Chatbot')
await message.reply_text("Shizuka AI Voice Chatbot")
return
text = message.text.split(None, 1)[1]
shizuka = text.replace(' ', '%20')
m = await message.reply_text('Shizuka is the best...')
shizuka = text.replace(" ", "%20")
m = await message.reply_text("Shizuka is the best...")
try:
L = await fetch(
f"https://api.affiliateplus.xyz/api/chatbot?message={shizuka}&botname=Shizuka&ownername=Chankit&user=1",
)
chatbot = L['message']
chatbot = L["message"]
VoiceAi = f"https://lyciavoice.herokuapp.com/shizuka?text={chatbot}&lang=en"
name = 'shizuka'
name = "shizuka"
except Exception as e:
await m.edit(str(e))
return
await m.edit('Made By @NeuroticAssociation')
await m.edit("Made By @NeuroticAssociation")
ShizukaVoice = await ai_shizuka(VoiceAi)
await m.edit('Replying...')
await m.edit("Replying...")
await message.reply_audio(audio=ShizukaVoice, title=chatbot, performer=name)
os.remove(ShizukaVoice)
await m.delete()
Loading

0 comments on commit a59d8b9

Please sign in to comment.