Beispiel #1
0
    def stars_unblock(self, event, user):
        count = StarboardBlock.delete().where(
            (StarboardBlock.guild_id == event.guild.id)
            & (StarboardBlock.user_id == user.id)).execute()

        if not count:
            raise CommandFail('{} was not blocked from the starboard'.format(
                user, ))

        # Renable posts and stars for this user
        StarboardEntry.unblock_user(user.id)

        # Finally, queue an update for the guild
        self.queue_update(event.guild.id, event.config)

        raise CommandSuccess('Unblocked {} from the starboard'.format(user, ))
Beispiel #2
0
    def stars_unblock(self, event, user):
        count = StarboardBlock.delete().where(
            (StarboardBlock.guild_id == event.guild.id)
            & (StarboardBlock.user_id == user.id)).execute()

        if not count:
            event.msg.reply(u'{} was not blocked from the starboard'.format(
                user, ))
            return

        # Renable posts and stars for this user
        StarboardEntry.unblock_user(user.id)

        # Finally, queue an update for the guild
        self.queue_update(event.guild.id, event.config, event)

        event.msg.reply(u'Unblocked {} from the starboard'.format(user, ))