async def war_crimes(self, ctx: commands.context, cheese=None): self.logging_service.log_starting_process( CommandsEnum.WAR_CRIMES.value) if not self.is_allowed_to_use_command(ctx.author.id, CommandsEnum.WAR_CRIMES): return if cheese and cheese.lower() == "cheese": quote = await QuoteEnum.get_quote( ctx, QuoteEnum.WAR_CRIMES_CHEESE.value.id, None) else: quote = await QuoteEnum.get_quote(ctx, QuoteEnum.WAR_CRIMES.value.id, None) if not quote: return if FileUtils.is_file(quote): emoji = await self.get_emoji( ctx, QuoteEnum.WAR_CRIMES.value.reaction.value) await FileUtils.send_file_with_reaction(ctx, quote, emoji)
async def quote(self, ctx: commands.context, quote_id=None): self.logging_service.log_starting_process(CommandsEnum.QUOTE.value) if not self.is_allowed_to_use_command(ctx.author.id, CommandsEnum.QUOTE): return if quote_id: quote = await QuoteEnum.get_quote(ctx, int(quote_id), UserEnum.GIANNAKIS.value.id) else: quote = await QuoteEnum.get_random_quote_from_history( ctx.guild.text_channels) if not quote: return if FileUtils.is_file(quote): await self.send_file(ctx, quote) else: message = quote.quote reaction = await self.get_emoji(ctx, quote.reaction.value) await self.send_message_with_reaction(ctx, f'> {message}', reaction)