|
|
|
@ -67,13 +67,18 @@ class DiscordClient(discord.Client):
|
|
|
|
|
'Sorry {0}, you have to wait a while before running '
|
|
|
|
|
'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):
|
|
|
|
|
try:
|
|
|
|
|
result = self.commands.last_quote()
|
|
|
|
|
except CommandError as e:
|
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
|
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):
|
|
|
|
|
try:
|
|
|
|
@ -81,7 +86,7 @@ class DiscordClient(discord.Client):
|
|
|
|
|
except CommandError as e:
|
|
|
|
|
await self.send_message(message.channel, 'Sorry {0}, {1}'.format(message.author.mention, e))
|
|
|
|
|
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)
|
|
|
|
|
async def _do_bellagram(self, server, user, message, **kwargs):
|
|
|
|
|