|
|
@ -47,14 +47,15 @@ class Waifus(commands.Cog):
|
|
|
|
await asyncio.sleep(2.5)
|
|
|
|
await asyncio.sleep(2.5)
|
|
|
|
# Delete the message
|
|
|
|
# Delete the message
|
|
|
|
await message.delete()
|
|
|
|
await message.delete()
|
|
|
|
except Exception as e:
|
|
|
|
except FileNotFoundError as e:
|
|
|
|
print(f'{e}')
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
|
|
# Bot ~Toga command for Josh
|
|
|
|
# Bot ~Toga command for Josh
|
|
|
|
@commands.command(aliases=['Toga'])
|
|
|
|
@commands.command(aliases=['Toga'])
|
|
|
|
@cooldown(1, 0, BucketType.channel)
|
|
|
|
@cooldown(1, 0, BucketType.channel)
|
|
|
|
async def toga(self, ctx):
|
|
|
|
async def toga(self, ctx):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
with open('togaImages.txt') as file:
|
|
|
|
with open('togaImages.txt') as file:
|
|
|
|
toga_array = file.readlines()
|
|
|
|
toga_array = file.readlines()
|
|
|
|
|
|
|
|
|
|
|
@ -69,14 +70,15 @@ class Waifus(commands.Cog):
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
await ctx.send(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
|
|
|
|
|
|
|
|
message = await ctx.send(error_function())
|
|
|
|
message = await ctx.send(error_function())
|
|
|
|
|
|
|
|
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
# Let the user read the message for 2.5 seconds
|
|
|
|
await asyncio.sleep(2.5)
|
|
|
|
await asyncio.sleep(2.5)
|
|
|
|
# Delete the message
|
|
|
|
# Delete the message
|
|
|
|
await message.delete()
|
|
|
|
await message.delete()
|
|
|
|
|
|
|
|
except FileNotFoundError as e:
|
|
|
|
file.close()
|
|
|
|
print(e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def error_function():
|
|
|
|
def error_function():
|
|
|
|