# Path: bot/plugins/commands.py
# PREFIX = os.getenv('PREFIX', '!')


from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import ugettext_lazy as _
from ..commands import PREFIX



def no_prefix_at_beginning(value):
    if value.startswith(PREFIX):
        raise ValidationError(
            _("Provide the command without the prefix '%(prefix)s'"),

# Path: bot/plugins/commands.py
# PREFIX = os.getenv('PREFIX', '!')


# Path: bot/plugins/custom_commands/models.py
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import ugettext_lazy as _
from ..commands import PREFIX




def no_prefix_at_beginning(value):
    if value.startswith(PREFIX):
        raise ValidationError(
            _("Provide the command without the prefix '%(prefix)s'"),

            code='prefix_present', params={'prefix': PREFIX}