Discord Eraser Bot

UserDemoteCommand extends UserCommand
in package

FinalYes
Attributes
#[AsCommand]
$name: 'app:user:demote'
$description: 'Remove ' . \App\Entity\User::ROLE_SUPER_ADMIN . ' from user roles'
$aliases: ['app:demote-user']

Table of Contents

Constants

ARGUMENT_DESCRIPTION_DISCORD_ID  = 'Discord user ID'
ARGUMENT_NAME_DISCORD_ID  = 'discord-id'
FAILURE  = \Symfony\Component\Console\Command\Command::FAILURE
INVALID  = \Symfony\Component\Console\Command\Command::INVALID
SUCCESS  = \Symfony\Component\Console\Command\Command::SUCCESS

Properties

$definitionListConverter  : DefinitionListConverter
$io  : SymfonyStyle
$userRepository  : UserRepository
$validator  : ValidatorInterface

Methods

setDefinitionListConverter()  : void
setUserRepository()  : void
setValidator()  : void
configure()  : void
execute()  : int
initialize()  : void
validateDiscordId()  : bool

Constants

ARGUMENT_DESCRIPTION_DISCORD_ID

public mixed ARGUMENT_DESCRIPTION_DISCORD_ID = 'Discord user ID'

ARGUMENT_NAME_DISCORD_ID

public mixed ARGUMENT_NAME_DISCORD_ID = 'discord-id'

FAILURE

public mixed FAILURE = \Symfony\Component\Console\Command\Command::FAILURE

INVALID

public mixed INVALID = \Symfony\Component\Console\Command\Command::INVALID

SUCCESS

public mixed SUCCESS = \Symfony\Component\Console\Command\Command::SUCCESS

Properties

Methods

setValidator()

public setValidator(ValidatorInterface $validator) : void
Parameters
$validator : ValidatorInterface
Attributes
#[Required]

execute()

protected execute(InputInterface $input, OutputInterface $output) : int
Parameters
$input : InputInterface
$output : OutputInterface
Tags
throws
ExceptionInterface
Return values
int

initialize()

protected initialize(InputInterface $input, OutputInterface $output) : void
Parameters
$input : InputInterface
$output : OutputInterface

validateDiscordId()

protected validateDiscordId(mixed $discordId) : bool
Parameters
$discordId : mixed
Return values
bool

        
On this page

Search results