async def quote_clearall(self, ctx: commands.Context): if not await confirm(ctx, content=translate("reset_confirmation")): await ctx.send(translate("op_cancelled")) return await self.config.guild(ctx.guild).quotes.set([]) await ctx.tick()
async def quote_remove(self, ctx: commands.Context, quote: Quote): await quote.ensure_can_modify(ctx.author) if await confirm(ctx, content=warning(translate("delete_confirmation"))): await quote.delete() await ctx.send(tick(translate("quote_deleted"))) else: await ctx.send(translate("op_cancelled"))
async def quote_message(self, ctx: commands.Context, message: int, channel: discord.TextChannel = None): channel = channel or ctx.channel try: message = await channel.get_message(message) except discord.NotFound: await ctx.send(warning(translate("message_not_found"))) except discord.Forbidden: await ctx.send(warning(translate("message_forbidden"))) else: quote = await Quote.create(message.content, ctx.author, message.author) await ctx.send(tick(translate("quote_added")), embed=quote.embed)
async def edit_author(self, ctx: commands.Context, quote: Quote, *, author: discord.Member): await quote.ensure_can_modify(ctx.author) quote.message_author = author await quote.save() await ctx.send( tick( translate("quote_attributed", id=int(quote), member=str(author))))
async def quote_add(self, ctx: commands.Context, *, message: str): quote = await Quote.create(message, ctx.author, ctx.author) await ctx.send(tick(translate("quote_added")), embed=quote.embed)