def _set_actions(self, ctx, op, flags, *, colour):
flags = unique(flags)
config = await self._check_config(ctx)
reduced = reduce(operator.or_, flags)
config.events = op(config.events, reduced)
await ctx.session.add(config)
enabled_flags = ', '.join(f.name for f in ActionFlag if config.events & f)
embed = (discord.Embed(colour=colour, description=', '.join(f.name for f in flags))
.set_author(name=f'Successfully {ctx.command.name}d the following actions')
.add_field(name='The following mod actions will now be logged',
value=enabled_flags, inline=False)
)
await ctx.send(embed=embed)
评论列表
文章目录