protected function onRun(Session $ses, array $args) { if (!($team = $ses->getTeam()) instanceof Team) { return TextFormat::RED . "You aren't in a team!"; } $ses->setWriteToChannel($ch = $team->getChannel()); return TextFormat::GREEN . "You are now talking on #{$ch}."; }