def ignore(self, ctx, *channels_or_members: Plonkable):
"""Ignores text channels or members from using the bot.
If no channel or member is specified, the current channel is ignored.
"""
channels_or_members = channels_or_members or [ctx.channel]
if len(channels_or_members) == 1:
thing = one(channels_or_members)
try:
await ctx.session.add(Plonks(guild_id=ctx.guild.id, entity_id=thing.id))
except asyncpg.UniqueViolationError:
await ctx.send(f"I'm already ignoring {thing}...")
raise commands.UserInputError
else:
await self._bulk_ignore_entries(ctx, channels_or_members)
await self._display_plonked(ctx, channels_or_members, plonk=True)
评论列表
文章目录