|
|
@ -67,13 +67,18 @@ class DiscordClient(discord.Client):
|
|
|
|
'Sorry {0}, you have to wait a while before running '
|
|
|
|
'Sorry {0}, you have to wait a while before running '
|
|
|
|
'the same command again'.format(message.author.mention))
|
|
|
|
'the same command again'.format(message.author.mention))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _format_quote(self, quote):
|
|
|
|
|
|
|
|
if '"' not in quote['text']:
|
|
|
|
|
|
|
|
quote['text'] = '"{0}"'.format(quote['text'])
|
|
|
|
|
|
|
|
return 'One time, Lilia said this... `#{id}: {text} [{game}] [{date}]`'.format(**quote)
|
|
|
|
|
|
|
|
|
|
|
|
async def _do_lastquote(self, server, user, message, **kwargs):
|
|
|
|
async def _do_lastquote(self, server, user, message, **kwargs):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
result = self.commands.last_quote()
|
|
|
|
result = self.commands.last_quote()
|
|
|
|
except CommandError as e:
|
|
|
|
except CommandError as e:
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
await self.send_message(message.channel, 'One time, Lilia said this... `#{id}: {text} [{game}] [{date}]`'.format(**result))
|
|
|
|
await self.send_message(message.channel, self._format_quote(result))
|
|
|
|
|
|
|
|
|
|
|
|
async def _do_findquote(self, server, user, message, filter, **kwargs):
|
|
|
|
async def _do_findquote(self, server, user, message, filter, **kwargs):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -81,7 +86,7 @@ class DiscordClient(discord.Client):
|
|
|
|
except CommandError as e:
|
|
|
|
except CommandError as e:
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
await self.send_message(message.channel, 'One time, Lilia said this... `#{id}: {text} [{game}] [{date}]`'.format(**result))
|
|
|
|
await self.send_message(message.channel, self._format_quote(result))
|
|
|
|
|
|
|
|
|
|
|
|
@cooldown(retries=2, timeout=5*60, failure=_cooldown_failure)
|
|
|
|
@cooldown(retries=2, timeout=5*60, failure=_cooldown_failure)
|
|
|
|
async def _do_bellagram(self, server, user, message, **kwargs):
|
|
|
|
async def _do_bellagram(self, server, user, message, **kwargs):
|
|
|
|